You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider returning a normal numpy array + meta data #503
This relates to #333. At that point I decided to rename the array class to Array to avoid confusion (#375), but that does not feel like a complete solution.
We cannot simply change what the functions return, so we should probably duplicate the high-level functions in a new namespace. This gives people time to adjust. We may eventually deprecate the old API, but that will probably take years.
Yep, a new API sounds like the best solution. Having said that, over at skimage we are considering moving away from guaranteeing numpy arrays, instead guaranteeing objects coercible to numpy arrays (e.g. dask arrays, zarr arrays...). Doing this in imageio would help support big data formats by returning dask arrays, as just one example.
Either way, I do think separating the array and the metadata is a good idea, because most existing array classes don't have a metadata attribute.
Two additional convenience functions would be useful:
reading only metadata, without loading the image
functions to introspect what kind of array imageio would provide upon reading, including type, size, shape, chunking, disk-cached or loaded into memory. (Unclear whether these should be part of the metadata.)
Activity
jni commentedon Feb 23, 2020
Yep, a new API sounds like the best solution. Having said that, over at skimage we are considering moving away from guaranteeing numpy arrays, instead guaranteeing objects coercible to numpy arrays (e.g. dask arrays, zarr arrays...). Doing this in imageio would help support big data formats by returning dask arrays, as just one example.
Either way, I do think separating the array and the metadata is a good idea, because most existing array classes don't have a metadata attribute.
Two additional convenience functions would be useful:
FirefoxMetzger commentedon Feb 10, 2022
closed via #739