Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Hameer Abbasi
On 08.09.19 10:56, Nathaniel Smith wrote: On Sun, Sep 8, 2019 at 1:04 AM Hameer Abbasi wrote: On 08.09.19 09:53, Nathaniel Smith wrote: OTOH, __array_function__ doesn't allow this kind of simplification: if we were using __array_function__ for ufuncs, every library would have to special-case e

Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Hameer Abbasi
On 09.09.19 03:26, Nathaniel Smith wrote: [snip] Generic in the sense that you can write __array_ufunc__ once and have it work for all ufuncs. You can do that too with __ua_function__, you get np.ufunc.__call__, with self=. The same holds for say, RandomState objects, once implemented. Most

Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Hameer Abbasi
On 10.09.19 05:32, Stephan Hoyer wrote: On Mon, Sep 9, 2019 at 6:27 PM Ralf Gommers > wrote: I think we've chosen to try the former - dispatch on functions so we can reuse the NumPy API. It could work out well, it could give some long-term maintenance i

Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Hameer Abbasi
On 07.09.19 22:06, Sebastian Berg wrote: On Fri, 2019-09-06 at 14:45 -0700, Ralf Gommers wrote: Let me try to move the discussion from the github issue here (this may not be the best place). (https://github.com/numpy/numpy/issues/14441 which asked for easier creation functions together with `_

Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Sebastian Berg
On Tue, 2019-09-10 at 17:28 +0200, Hameer Abbasi wrote: > On 07.09.19 22:06, Sebastian Berg wrote: > > On Fri, 2019-09-06 at 14:45 -0700, Ralf Gommers wrote: > > > > > > > > Let me try to move the discussion from the github issue here (this > > may > > not be the best place). ( > > https://githu

Re: [Numpy-discussion] NEP 31 — Context-local and global overrides of the NumPy API

2019-09-10 Thread Stephan Hoyer
On Tue, Sep 10, 2019 at 6:06 AM Hameer Abbasi wrote: > On 10.09.19 05:32, Stephan Hoyer wrote: > > On Mon, Sep 9, 2019 at 6:27 PM Ralf Gommers > wrote: > >> I think we've chosen to try the former - dispatch on functions so we can >> reuse the NumPy API. It could work out well, it could give some

[Numpy-discussion] NumPy Community Meeting Wednesday, Sep. 11

2019-09-10 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 11 at 11 am Pacific Time. Everyone is invited to join in and edit the work-in- progress meeting topics and notes: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian BEGIN:VCALENDAR PRODID:-//Ximian//NONSGML Evol