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

2018-03-17 Thread Eric Wieser
I would have thought that a simple tuple of types would be more appropriate than using integer flags, since that means that isinstance can be used on the individual elements. Ideally there’d be a typing.Intersection[TraitA, TraitB] for this kind of thing. ​ On Sat, 17 Mar 2018 at 15:10 Thomas Casw

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

2018-03-17 Thread Thomas Caswell
Yes, meant IntFlag :sheep: On Sat, Mar 17, 2018 at 6:02 PM Hameer Abbasi wrote: > > 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. > > > Don’t you mean IntF

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

2018-03-17 Thread Hameer Abbasi
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. Don’t you mean IntFlag ? I like Marten’s idea of “grouping to

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

2018-03-17 Thread Thomas Caswell
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 <