imagej / imagej/pyimagej

Review treatment of `__array__` attribute

Open
#341 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
534
Forks
95
PR merge metrics
No merged PRs in 30d

Description

I'm writing this issue from memory after finding an old note to myself that I wrote in response to a conversation I had with @tlambert03 some time last year. 😅

* The `imagej.images.is_arraylike` function checks for four attributes: `shape`, `dtype`, `__array__`, and `ndim`. Is this correct?

* The classes that augment Java-side `net.imglib2.RandomAccessibleInterval` and related objects to be more arraylike include implementations of `shape`, `dtype`, and `ndim` on the appropriate superinterfaces, but nothing implements `__array__`. Should it?

Ideas and opinions welcome!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with imagej.images.is_arraylike and inspect the classes augmenting Java-side net.imglib2.RandomAccessibleInterval and related objects. Compare their shape, dtype, and ndim implementations with the function's __array__ check, then seek a maintainer decision on the intended treatment. Done means the behavior and any required change are agreed and covered appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.