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

2018-03-10 Thread Marten van Kerkwijk
​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)

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

2018-03-10 Thread Chris Barker
On Sat, Mar 10, 2018 at 1:27 PM, Matthew Rocklin wrote: > I'm very glad to see this discussion. > me too, but > I think that coming up with a single definition of array-like may be > difficult, and that we might end up wanting to embrace duck typing instead. > exactly -- I think there is

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

2018-03-10 Thread Matthew Rocklin
I'm very glad to see this discussion. I think that coming up with a single definition of array-like may be difficult, and that we might end up wanting to embrace duck typing instead. It seems to me that different array-like classes will implement different mixtures of features. It may be difficu