ITK
ITK copied to clipboard
Implement `__array__` and `__array_ufunc__` on itk.Image
Support direct use with NumPy while preserving metadata.
See pandas.Series, xarray (?), and work from @danielballan on Dask for reference.
That work is this documentation in numpy, which as of this writing is still a PR: https://github.com/numpy/numpy/pull/13979/files
__array__
added in #1158
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
References:
- https://numpy.org/doc/stable/reference/ufuncs.html
- https://numpy.org/doc/stable/reference/generated/numpy.ufunc.html#numpy.ufunc
- https://numpy.org/neps/nep-0013-ufunc-overrides.html
- https://numpy.org/doc/stable/reference/arrays.classes.html#numpy.class.array_ufunc
- https://github.com/dask/dask/blob/7c419580037f552befc2650cb13967dd6bdef86a/dask/array/core.py#L1120-L1146
- https://github.com/cupy/cupy/pull/1247/files
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
xref #4123