Open
Description
In trying to adapt xarray
to numpy>=2
(and thus switching testing code from numpy.array_api
to array-api-strict
), I noticed that the array API does not require the nbytes
property on arrays, nor the itemsize
property on dtypes.
Thus, the only way to figure out the size of an array we could find was to create a function that dispatches to finfo
/ iinfo
(and returns a hard-coded 1 byte for booleans), then use that and arr.size
to compute the size of the array. This feels like more work than should be necessary, so I wonder if you would be open to extending the array API with arr.nbytes
or arr.dtype.itemsize
(or both)?