Replies: 1 comment 3 replies
-
|
There are no convenience methods from reading into a buffer, and all reader functions returns an ndarray. You can use An alternative is using the netcdf crate which has get_values and get_values_into for when you want a vec or to put values into a user supplied buffer |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with a
hdf5file that contains several one-dimensional datasets and zero higher-dimensionality datasets. I have been reading the shorter datasets usingread_rawwhich returns the data points contained in aVec. This is fine for smaller datasets, but for larger datasets it would be preferable to read only the required section into aVecand leave the rest of the dataset alone.Current Solution
I found an example using
read_slice_1d(ndarray::s![start..stop]); however, this returns andarray::Array1which must then be converted into aVec. It also requires yet another dependency (ndarray).Question
Does anyone know of a "built-in" solution to read a slice from a 1D
hdf5dataset into aVecwithout needing additional dependencies?Beta Was this translation helpful? Give feedback.
All reactions