Skip to content

Commit 5a83578

Browse files
authored
Fix another incorrect double wrapping of HDF5 high-level object (#153)
1 parent 5e3ffda commit 5a83578

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/MAT_HDF5.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,11 @@ function m_writearray(parent::HDF5Parent, name::String, adata::AbstractArray{Com
356356
try
357357
stype = dataspace(adata)
358358
if compress
359-
obj_id = create_dataset(parent, name, dtype, stype;
359+
dset = create_dataset(parent, name, dtype, stype;
360360
compress = 3, chunk = HDF5.heuristic_chunk(adata))
361361
else
362-
obj_id = create_dataset(parent, name, dtype, stype)
362+
dset = create_dataset(parent, name, dtype, stype)
363363
end
364-
dset = HDF5.Dataset(obj_id, HDF5.file(parent))
365364
try
366365
arr = reshape(reinterpret(T, adata), tuple(2, size(adata)...))
367366
write_dataset(dset, dtype, arr)
@@ -371,7 +370,7 @@ function m_writearray(parent::HDF5Parent, name::String, adata::AbstractArray{Com
371370
finally
372371
close(stype)
373372
end
374-
dset
373+
return dset
375374
finally
376375
close(dtype)
377376
end

0 commit comments

Comments
 (0)