It would be nice if there was an IntEnum [1] that was taken is an input to `np.asarrayish` and `np.isarrayish` to require a combination of the groups of attributes/methods/semantics.
Tom [1] https://docs.python.org/3/library/enum.html#intenum On Sat, Mar 10, 2018 at 7:14 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > 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 > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion