Re: [Numpy-discussion] is __array_ufunc__ ready for prime-time?

2017-11-04 Thread Ben Rowland
> On 2 Nov 2017, at 22:39, Marten van Kerkwijk > wrote: > > I guess my argument boils down to it being better to state that a > function only accepts arrays and happily let it break on, e.g., > matrix, than use `asarray` to make a matrix into an array even though > it really isn’t. I would su

Re: [Numpy-discussion] is __array_ufunc__ ready for prime-time?

2017-11-04 Thread Marten van Kerkwijk
Hi Ben, You just summarized excellently why I'm on a quest to change `asarray` to `asanyarray` within numy (or at least add a `subok` keyword for things like `broadcast_arrays`)! Obviously, this covers only ndarray subclasses, not duck types, though I guess in principle one could use the ABC regis