Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Marten van Kerkwijk
On Thu, Apr 25, 2019 at 6:04 PM Stephan Hoyer wrote: > On Thu, Apr 25, 2019 at 12:46 PM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > > > It would be nice, though, if we could end up with also option 4 being >> available, if only because code that just can assume ndarray will be

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Ralf Gommers
On Fri, Apr 26, 2019 at 12:04 AM Stephan Hoyer wrote: > On Thu, Apr 25, 2019 at 12:46 PM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> It seems we are adding to the wishlist! I see four so far: >> 1. Exposed in API, can be overridden with __array_ufunc__ >> 2. One that converts

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Stephan Hoyer
On Thu, Apr 25, 2019 at 12:46 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > It seems we are adding to the wishlist! I see four so far: > 1. Exposed in API, can be overridden with __array_ufunc__ > 2. One that converts everything to ndarray (or subclass); essentially the > current

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Hameer Abbasi
> What's __array_dtype__? That string doesn't seem to appear in the > numpy source, and google has no hits… This was a proposed protocol for dispatching over user-defined dtype objects, I think Stephan and a few others wrote up a mock at SciPy 2018. Best Regards, Hameer Abbasi signature.asc

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Nathaniel Smith
On Thu, Apr 25, 2019 at 1:30 PM Hameer Abbasi wrote: > Although, in general, I agree with Stephan’s design goals, I agree with > Marten that the number of protocols are getting larger and may get out of > hand if not handled properly. There’s even one Marten forgot to mention: >

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Nathaniel Smith
On Thu, Apr 25, 2019 at 10:10 AM Stephan Hoyer wrote: > > On Wed, Apr 24, 2019 at 9:56 PM Nathaniel Smith wrote: >> >> When you say "numpy array specific" and >> "__numpy_(nd)array_implementation__", that sounds to me like you're >> trying to say "just step 3, skipping steps 1 and 2"? Step 3 is

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Hameer Abbasi
> On Thursday, Apr 25, 2019 at 9:45 PM, Marten van Kerkwijk > mailto:m.h.vankerkw...@gmail.com)> wrote: > It seems we are adding to the wishlist! I see four so far: > 1. Exposed in API, can be overridden with __array_ufunc__ > 2. One that converts everything to ndarray (or subclass); essentially

Re: [Numpy-discussion] grant proposal for core scientific Python projects (rejected)

2019-04-25 Thread Ralf Gommers
On Sat, Apr 20, 2019 at 12:41 PM Ralf Gommers wrote: > > > On Thu, Apr 18, 2019 at 10:03 PM Joe Harrington > wrote: > > >> 3. There's such a thing as a share-in-savings contract at NASA, in which >> you calculate a savings, such as from avoided costs of licensing IDL or >> Matlab, and say

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Marten van Kerkwijk
It seems we are adding to the wishlist! I see four so far: 1. Exposed in API, can be overridden with __array_ufunc__ 2. One that converts everything to ndarray (or subclass); essentially the current implementation; 3. One that does asduckarray 4. One that assumes all arguments are arrays. Maybe

Re: [Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

2019-04-25 Thread Stephan Hoyer
On Wed, Apr 24, 2019 at 9:56 PM Nathaniel Smith wrote: > When you say "numpy array specific" and > "__numpy_(nd)array_implementation__", that sounds to me like you're > trying to say "just step 3, skipping steps 1 and 2"? Step 3 is the one > that operates on ndarrays... > My thinking was that