Skip to content

Commit

Permalink
Merge pull request #169 from JuliaRobotics/hotfix/exampledeprecation
Browse files Browse the repository at this point in the history
small fix
  • Loading branch information
dehann authored Oct 5, 2018
2 parents fc79fbe + fa70f22 commit b2fd7f9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Optim 0.16.0
Distributions 0.16.4
StatsBase 0.25.0
KernelDensityEstimate 0.4.0
HDF5 0.10.2
JLD2 0.1.2
FileIO 1.0.2
ProgressMeter 0.6.0
Expand Down
2 changes: 1 addition & 1 deletion examples/ApproximateConvolution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import IncrementalInference: getSample
toggleYTicks()


type MultiModalConditional <: IncrementalInference.FunctorPairwise
mutable struct MultiModalConditional <: IncrementalInference.FunctorPairwise
x::Vector{Distribution}
hypo::Categorical
MultiModalConditional{D <: Distribution}(x::Vector{D}, p::Categorical) = new(x, p)
Expand Down
4 changes: 2 additions & 2 deletions src/FactorGraph01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function setDefaultNodeData!(v::Graphs.ExVertex,
# dims = size(initval,1) # rows indicate dimensions
sp = Int[0;] #round.(Int,range(dodims,stop=dodims+dims-1,length=dims))
gbw = getBW(pN)[:,1]
gbw2 = Array{Float64}(length(gbw),1)
gbw2 = Array{Float64}(undef, length(gbw),1)
gbw2[:,1] = gbw[:]
pNpts = getPoints(pN)
data = VariableNodeData(initval, stdev, pNpts,
Expand Down Expand Up @@ -299,7 +299,7 @@ function getVal(vA::Array{Graphs.ExVertex,1})
cols = cumsum(cols)
sc = cols[end]
rw = floor(Int,rows[1])
val = Array{Float64,2}(rw, sc)
val = Array{Float64,2}(undef,rw, sc)
for i in 1:(len-1)
val[:,(cols[i]+1):cols[i+1]] = vals[i]
end
Expand Down
3 changes: 1 addition & 2 deletions src/IncrementalInference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ using
Random,
NLsolve,
StatsBase,
HDF5,
JLD2,
FileIO,
ProgressMeter,
Expand All @@ -27,7 +26,7 @@ using
const KDE = KernelDensityEstimate

import Base: convert
import HDF5: root
# import HDF5: root
import Distributions: sample
import Random: rand, rand!
import KernelDensityEstimate: kde!
Expand Down
2 changes: 1 addition & 1 deletion src/SolveTree01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function productbelief(fg::FactorGraph,
pGM = getPoints(dens[1])
else
@warn "Unknown density product on vertid=$(vertid), lennonp=$(lennonp), lenpart=$(lenpart)"
pGM = Array{Float64,2}(0,1)
pGM = Array{Float64,2}(undef, 0,1)
end

return pGM
Expand Down

0 comments on commit b2fd7f9

Please sign in to comment.