[Numpy-discussion] new NEP: np.AbstractArray and np.asabstractarray

Marten van Kerkwijk m.h.vankerkwijk at gmail.com
Sat Mar 10 19:13:50 EST 2018


​I think we don't have to make it sounds like there are *that* many types
of compatibility: really there is just array organisation
(indexing/reshaping) and array arithmetic. These correspond roughly to
ShapedLikeNDArray in astropy and NDArrayOperatorMixin in numpy (missing so
far is concatenation). The advantage of the ABC classes is that they can
supply missing methods (say, size, isscalar, __len__, and ndim given shape;
__iter__ given __getitem__, ravel, squeeze, flatten given reshape; etc.).

-- Marten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180310/10a77fcd/attachment.html>


More information about the NumPy-Discussion mailing list