JuliaIO / MAT.jl

Julia module for reading MATLAB files
MIT License
278 stars 71 forks source link

Incremental reading of complex matrix from MatlabHDF5File #76

Open jgbos opened 6 years ago

jgbos commented 6 years ago

I mentioned this problem in #30 and realized it should be a new issue. I would like to read in a complex matrix incrementally via

mat.plain["data"][:,:,1]

but get

ERROR: Dataset indexing (hyperslab) is available only for bits types

The eltype of the dataset is

HDF5.hdf5_to_julia_eltype(HDF5.datatype(d))

which I'm guessing how complex objects are saved. Now, I can read the entire dataset in via read but I'd like to be able to slice along a dimension, as shown above. Obviously this works for Real arrays, but not Complex types. Is it simple to update read_complex to read incrementally? I'm not very familiar with HDF5.