On Fri, Mar 9, 2018 at 2:29 AM, Nathaniel Smith <n...@pobox.com> wrote:
> On Thu, Mar 8, 2018 at 7:06 AM, Marten van Kerkwijk > <m.h.vankerkw...@gmail.com> wrote: > > A larger comment: you state that you think `np.asanyarray` is a > > mistake since `np.matrix` and `np.ma.MaskedArray` would pass through > > and that those do not strictly mimic `NDArray`. Here, I agree with > > `matrix` (but since we're deprecating it, let's remove that from the > > discussion), but I do not see how your proposed interface would not > > let `MaskedArray` pass through, nor really that one would necessarily > > want that. > > We can discuss whether MaskedArray should be an AbstractArray. > Conceptually it probably should be; I think that was a goal of the > MaskedArray authors (even if they wouldn't have put it that way). In > practice there are a lot of funny quirks in MaskedArray, so I'd want > to look more carefully in case there are weird incompatibilities that > would cause problems. Note that we can figure this out after the NEP > is finished, too. > > I wonder if the matplotlib folks have any thoughts on this? I know > they're one of the more prominent libraries that tries to handle both > regular and masked arrays, so maybe they could comment on how often > they run There's a lot of places in matplotlib where this could simplify our checks, though probably more from a standpoint of "does this thing we've been given need converting?" There are also a lot of places where matplotlib needs to know if we have actually been given a MaskedArray so that we can handle it specially. Ryan -- Ryan May
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion