Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Sebastian Berg
On Wed, 2019-03-06 at 12:41 -0800, Stephan Hoyer wrote: > On Wed, Mar 6, 2019 at 10:10 AM Frederic Bastien > wrote: > > Hi, > > > > I was told recently about the NEP-18. I like it, but I have a > > comment. > > > > At first, it is enabled in a release by setting an environment > > variable. >

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Frederic Bastien
I like your idea Sebastian. This way it is enabled only when needed and it is invisible to the user at the same time. Stefan, does it solve well enough the potential problem you raised? It still raise the problem that if you import a lib and do not use it, then the small array would slow down.

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Stefan van der Walt
Hi Sebastian, Frederic, On Thu, 07 Mar 2019 14:23:10 +, Frederic Bastien wrote: > I like your idea Sebastian. This way it is enabled only when needed and it is > invisible to the user at the same time. > > Stefan, does it solve well enough the potential problem you raised? I don't think so.

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Frederic Bastien
I see speed changes vs behavior changes as different category of changes in my mind. I understand that now importing library can slow down NumPy for small arrays. But I have the impression you tell this can also give behavior change. I do not understand why this could happen. A pure numpy script

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Marten van Kerkwijk
Hi Frédéric, The problem with any environment type variable is that when you disable the dispatch functionality, all other classes that rely on being able to override a numpy function stop working as well, i.e., the behaviour of everything from dask to astropy's Quantity would depend on that setti

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Sebastian Berg
On Thu, 2019-03-07 at 18:24 +, Frederic Bastien wrote: > I see speed changes vs behavior changes as different category of > changes in my mind. > > I understand that now importing library can slow down NumPy for small > arrays. > But I have the impression you tell this can also give behavior >

Re: [Numpy-discussion] NEP-18 comment

2019-03-07 Thread Stephan Hoyer
On Thu, Mar 7, 2019 at 11:18 AM Sebastian Berg wrote: > Things seem a bit hard to time with all the C/Python boundaries > involved, but it seems to me that the actual time spend on the C-side > is reasonably low. The biggest chunk is probably that we have 4 > function calls instead of 1: > > 1.