Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Hameer Abbasi
On Thu, 2019-05-23 at 10:19 -0700, Stephan Hoyer wrote: > On Thu, May 23, 2019 at 2:43 AM Ralf Gommers > wrote: > > On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < > > m.h.vankerkw...@gmail.com> wrote: > > > > If we want to keep an "off" switch we might want to add some > > > > sort of API

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Stephan Hoyer
On Thu, May 23, 2019 at 2:43 AM Ralf Gommers wrote: > > > On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> >> If we want to keep an "off" switch we might want to add some sort of API >>> for exposing whether NumPy is using __array_function__ or not.

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Ralf Gommers
On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > If we want to keep an "off" switch we might want to add some sort of API >> for exposing whether NumPy is using __array_function__ or not. Maybe >> numpy.__experimental_array_function_enabled__ = True, so

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Marten van Kerkwijk
> If we want to keep an "off" switch we might want to add some sort of API > for exposing whether NumPy is using __array_function__ or not. Maybe > numpy.__experimental_array_function_enabled__ = True, so you can just test > `hasattr(numpy, '__experimental_array_function_enabled__')`? This is >

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Stephan Hoyer
On Wed, May 22, 2019 at 2:36 PM Ralf Gommers wrote: > I would still like to turn on __array_function__ in NumPy 1.17. At least, >>> let's try that for the release candidate and see how it goes. >>> >> > I agree. I'd actually suggest flipping the switch asap and see if it > causes any issues for

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Ralf Gommers
On Wed, May 22, 2019 at 9:46 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi Stephan, > > I'm quite happy with the idea of turning on __array_function__ but > postponing any formal solution to getting into the wrapped routines (i.e., > one can use __wrapped__, but it is an

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Marten van Kerkwijk
Hi Stephan, I'm quite happy with the idea of turning on __array_function__ but postponing any formal solution to getting into the wrapped routines (i.e., one can use __wrapped__, but it is an implementation detail that is not documented and comes with absolutely no guarantees). That way, 1.17

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Stephan Hoyer
Thanks for raising these concerns. The full implications of my recent __skip_array_function__ proposal are only now becoming evident to me now, looking at it's use in GH-13585. Guaranteeing that it does not expand NumPy's API surface seems hard to achieve without pervasive use of

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-22 Thread Juan Nunez-Iglesias
I just want to express my general support for Marten's concerns. As an "interested observer", I've been meaning to give `__array_function__` a try but haven't had the chance yet. So from my anecdotal experience I expect that more people need to play with this before setting the API in stone.

[Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-21 Thread Marten van Kerkwijk
Hi All, For 1.17, there has been a big effort, especially by Stephan, to make __array_function__ sufficiently usable that it can be exposed. I think this is great, and still like the idea very much, but its impact on the numpy code base has gotten so big in the most recent PR (gh-13585) that I