Skip to content

Consider returning a normal numpy array + meta data #503

Closed

Description

@almarklein

See #362 for the meta-data overview issue.

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.

Activity

  1. jni commented on Feb 23, 2020

    @jni
    Contributor

    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.)
  2. FirefoxMetzger commented on Feb 10, 2022

    @FirefoxMetzger
    Contributor

    closed via #739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions