Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-24 Thread Antoine Pitrou
On Thu, 24 Sep 2015 00:20:23 -0700 Nathaniel Smith wrote: > > int PyUFunc_Identity(PyFuncObject *) > > > > Replaces ufunc->identity. > > Hmm, I can imagine cases where we might want to change how this works. > (E.g. if np.dot were a ufunc then the existing identity settings >

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-24 Thread Nathaniel Smith
On Tue, Sep 22, 2015 at 7:57 AM, Antoine Pitrou wrote: > > Hi, > > This e-mail is an attempt at proposing an API to solve Numba's needs. Thanks! > Attribute access > > > int PyUFunc_Nin(PyUFuncObject *) > > Replaces ufunc->nin. > > int

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-22 Thread Nathaniel Smith
On Tue, Sep 22, 2015 at 3:43 PM, Charles R Harris wrote: > > > On Mon, Sep 21, 2015 at 10:23 PM, Nathaniel Smith wrote: [...] >> When it comes to evolving these APIs in general: one unfortunate thing >> about the PyArrayObject changes in 1.7 is that

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-22 Thread Charles R Harris
On Tue, Sep 22, 2015 at 10:19 PM, Nathaniel Smith wrote: > On Tue, Sep 22, 2015 at 3:43 PM, Charles R Harris > wrote: > > > > > > On Mon, Sep 21, 2015 at 10:23 PM, Nathaniel Smith wrote: > [...] > >> When it comes to evolving these

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-22 Thread Antoine Pitrou
On Mon, 21 Sep 2015 21:38:36 -0700 Nathaniel Smith wrote: > Hi Antoine, > > On Mon, Sep 21, 2015 at 2:44 AM, Antoine Pitrou wrote: > > > > Hi Nathaniel, > > > > On Sun, 20 Sep 2015 21:13:30 -0700 > > Nathaniel Smith wrote: > >> Given this, I

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-22 Thread Antoine Pitrou
Hi, This e-mail is an attempt at proposing an API to solve Numba's needs. Attribute access int PyUFunc_Nin(PyUFuncObject *) Replaces ufunc->nin. int PyUFunc_Nout(PyUFuncObject *) Replaces ufunc->nout. int PyUFunc_Nargs(PyUFuncObject *) Replaces ufunc->nargs.

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-21 Thread Nathaniel Smith
On Mon, Sep 21, 2015 at 7:29 AM, Jaime Fernández del Río wrote: > We have the PyArrayObject vs PyArrayObject_fields definition in > ndarraytypes.h that is used to enforce access to the members through inline > functions rather than directly, which seems to me like the right

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-21 Thread Nathaniel Smith
Hi Antoine, On Mon, Sep 21, 2015 at 2:44 AM, Antoine Pitrou wrote: > > Hi Nathaniel, > > On Sun, 20 Sep 2015 21:13:30 -0700 > Nathaniel Smith wrote: >> Given this, I propose that for 1.11 we: >> 1) go ahead and hide/disable the problematic parts of the

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-21 Thread Bryan Van de Ven
> > until then our only real options are either hard breaks or nothing, so > unless we want to do a hard break there's not much point talking about > it. I think this is the most important sentence from this thread. Thank you Nathaniel for you extremely thorough analysis of the impact on

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-21 Thread Jaime Fernández del Río
We have the PyArrayObject vs PyArrayObject_fields definition in ndarraytypes.h that is used to enforce access to the members through inline functions rather than directly, which seems to me like the right way to go: don't leave stones unturned, hide everything and provide PyUFunc_NIN,

Re: [Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-21 Thread Antoine Pitrou
Hi Nathaniel, On Sun, 20 Sep 2015 21:13:30 -0700 Nathaniel Smith wrote: > Given this, I propose that for 1.11 we: > 1) go ahead and hide/disable the problematic parts of the ABI/API, > 2) coordinate with the known affected projects to minimize disruption > to their users (which

[Numpy-discussion] draft NEP for breaking ufunc ABI in a controlled way

2015-09-20 Thread Nathaniel Smith
Hi all, Here's a first draft NEP for comments. -- Synopsis Improving numpy's dtype system requires that ufunc loops start having access to details of the specific dtype instance they are acting on: e.g. an implementation of np.equal for strings needs access to the dtype object in