Re: [Numpy-discussion] Get rid of special scalar arithmetic

2016-01-13 Thread Robert Kern
On Wed, Jan 13, 2016 at 5:18 AM, Charles R Harris wrote: > > Hi All, > > I've opened issue #7002, reproduced below, for discussion. >> >> Numpy umath has a file scalarmath.c.src that implements scalar arithmetic using special functions that are about 10x faster than the

Re: [Numpy-discussion] Get rid of special scalar arithmetic

2016-01-13 Thread Nathaniel Smith
On Tue, Jan 12, 2016 at 9:18 PM, Charles R Harris wrote: > > Hi All, > > I've opened issue #7002, reproduced below, for discussion. >> >> Numpy umath has a file scalarmath.c.src that implements scalar arithmetic >> using special functions that are about 10x faster than

Re: [Numpy-discussion] Get rid of special scalar arithmetic

2016-01-13 Thread Marten van Kerkwijk
Just thought I would add here a general comment I made in the thread: replacing scalars everywhere with array scalars (i.e., ndim=0) would be great also from the perspective of ndarray subclasses; as is, it is quite annoying to have to special-case, e.g., getting a single subclass element, and

Re: [Numpy-discussion] Get rid of special scalar arithmetic

2016-01-13 Thread Sebastian Berg
On Mi, 2016-01-13 at 10:33 -0500, Marten van Kerkwijk wrote: > Just thought I would add here a general comment I made in the thread: > replacing scalars everywhere with array scalars (i.e., ndim=0) would > be great also from the perspective of ndarray subclasses; as is, it > is quite annoying to

[Numpy-discussion] Get rid of special scalar arithmetic

2016-01-12 Thread Charles R Harris
Hi All, I've opened issue #7002 , reproduced below, for discussion. > Numpy umath has a file scalarmath.c.src that implements scalar arithmetic > using special functions that are about 10x faster than the equivalent > ufuncs. > > In [1]: a =