Skip to content

Commit

Permalink
Update deprecated HDF5 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwilliam77 committed Jan 26, 2021
1 parent a038569 commit d6c5568
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/smc_main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,10 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr
##################################################################################
if !testing
simfile = h5open(particle_store_path, "w")
particle_store = d_create(simfile, "smcparams", datatype(Float64),
dataspace(n_parts, n_para))
particle_store = isdefined(HDF5, :create_dataset) ?
HDF5.create_dataset(simfile, "smcparams", datatype(Float64), dataspace(n_parts, n_para)) :
HDF5.d_create(simfile, "smcparams", datatype(Float64), dataspace(n_parts, n_para))

for k in 1:n_parts; particle_store[k,:] = cloud.particles[k, 1:n_para] end
close(simfile)
jldopen(savepath, true, true, true, IOStream) do file
Expand Down

0 comments on commit d6c5568

Please sign in to comment.