Re: [Numpy-discussion] composition of the steering council (was Re: Governance model request)

2015-09-29 Thread Nathaniel Smith
On Fri, Sep 25, 2015 at 7:15 AM, Thomas Caswell wrote: > To respond to the devils advocate: > > Creating this organizational framework is a one time boot-strapping event. > You could use wording like "The initial council will include those who have > made significant

[Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-29 Thread Juha Jeronen
Hi all, I recently developed a Cython-based, OpenMP-accelerated quartic (and cubic, quadratic) polynomial solver to address a personal research need for quickly solving a very large number of independent low-degree polynomial equations for both real and complex coefficients. For example, on

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Freddy Rietdijk
I wouldn't know of any valid output when applying the sign function to NaN. Therefore, I think it is correct to return a ValueError. Furthermore, I would prefer such an error over just returning NaN since it helps you locating where NaN is generated. On Tue, Sep 29, 2015 at 5:13 PM, Charles R

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Allan Haldane
On 09/29/2015 11:39 AM, josef.p...@gmail.com wrote: > > > On Tue, Sep 29, 2015 at 11:25 AM, Anne Archibald > wrote: > > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point > arrays. Why should it be different for object

[Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
Hi All, Due to a recent commit, Numpy master now raises an error when applying the sign function to an object array containing NaN. Other options may be preferable, returning NaN for instance, so I would like to open the topic for discussion on the list. Thoughts? Chuck

Re: [Numpy-discussion] composition of the steering council (was Re: Governance model request)

2015-09-29 Thread Travis Oliphant
Thanks for the candid discussion and for expressing concerns freely. I think Nathaniel's "parenting" characterization of NumPy from me is pretty accurate.I do feel a responsibility for the *stuff* that's out there, and that is what drives me. I do see the many contributions from others and

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread josef.pktd
On Tue, Sep 29, 2015 at 11:25 AM, Anne Archibald wrote: > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. > Why should it be different for object arrays? > > Anne > > P.S. If you want exceptions when NaNs appear, that's what np.seterr is > for. -A >

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Anne Archibald
IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. Why should it be different for object arrays? Anne P.S. If you want exceptions when NaNs appear, that's what np.seterr is for. -A On Tue, Sep 29, 2015 at 5:18 PM Freddy Rietdijk wrote: > I

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Antoine Pitrou
On Tue, 29 Sep 2015 09:13:15 -0600 Charles R Harris wrote: > > Due to a recent commit, Numpy master now raises an error when applying the > sign function to an object array containing NaN. Other options may be > preferable, returning NaN for instance, so I would like

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Joe Kington
On Tue, Sep 29, 2015 at 11:14 AM, Antoine Pitrou wrote: > > None for example? float('nan') may be a bit weird amongst e.g. an array > of Decimals The downside to `None` is that it's one more thing to check for and makes object arrays an even weirder edge case.

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 9:25 AM, Anne Archibald wrote: > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. > Why should it be different for object arrays? > What about non-numeric objects in general ? Chuck

[Numpy-discussion] Cython-based OpenMP-accelerated quartic, polynomial solver

2015-09-29 Thread Matti Picus
The algorithms for cubics and quadratics come from Numerical Recipes (3rd ed.), and the quartic problem is internally reduced to a cubic and two quadratics, using well-known standard tricks.Nice, wll documented code. Just to be sure you are on safe ground, you took the *algorithms*

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Sebastian Berg
On Di, 2015-09-29 at 11:16 -0700, Nathaniel Smith wrote: > On Sep 29, 2015 8:25 AM, "Anne Archibald" wrote: > > > > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point > arrays. Why should it be different for object arrays? > > The argument for doing it this way

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Allan Haldane
On 09/29/2015 02:16 PM, Nathaniel Smith wrote: > On Sep 29, 2015 8:25 AM, "Anne Archibald" > wrote: >> >> IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point > arrays. Why should it be different for object arrays? > > The argument

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Chris Barker - NOAA Federal
One of the usecases that has sneaked in during the last few numpy versions is that object arrays contain numerical arrays where the shapes don't add up to a rectangular array. I think that's the wrong way to dve that problem -- we really should have a "proper" ragged array implementation. But is

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 7:31 PM, Charles R Harris wrote: > > > On Tue, Sep 29, 2015 at 6:58 PM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> >> One of the usecases that has sneaked in during the last few numpy >> versions is that object arrays

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-29 Thread Chris Barker - NOAA Federal
This sounds pretty cool -- and I've had a use case. So it would be nice to get into Numpy. But: I doubt we'd want OpenMP dependence in Numpy itself. But maybe a pure Cython non-MP version? Are we putting Cuthon in Numpy now? I lost track. -CHB Sent from my iPhone > On Sep 29, 2015, at 7:35

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 6:48 PM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > This sounds pretty cool -- and I've had a use case. So it would be > nice to get into Numpy. > > But: I doubt we'd want OpenMP dependence in Numpy itself. > > But maybe a pure Cython non-MP version? > >

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 6:58 PM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > > One of the usecases that has sneaked in during the last few numpy versions > is that object arrays contain numerical arrays where the shapes don't add > up to a rectangular array. > > > I think that's

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Stephan Hoyer
On Tue, Sep 29, 2015 at 8:13 AM, Charles R Harris wrote: > Due to a recent commit, Numpy master now raises an error when applying the > sign function to an object array containing NaN. Other options may be > preferable, returning NaN for instance, so I would like to

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 11:59 AM, Stephan Hoyer wrote: > On Tue, Sep 29, 2015 at 8:13 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Due to a recent commit, Numpy master now raises an error when applying >> the sign function to an object array containing NaN.

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic, polynomial solver

2015-09-29 Thread Juha Jeronen
Hi, On 29.09.2015 19:16, Matti Picus wrote: The algorithms for cubics and quadratics come from Numerical Recipes (3rd ed.), and the quartic problem is internally reduced to a cubic and two quadratics, using well-known standard tricks. Nice, wll documented code. Just to be sure you are on safe

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Nathaniel Smith
On Sep 29, 2015 8:25 AM, "Anne Archibald" wrote: > > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. Why should it be different for object arrays? The argument for doing it this way would be that arbitrary python objects don't have a sign, and the

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread Charles R Harris
On Tue, Sep 29, 2015 at 12:16 PM, Nathaniel Smith wrote: > On Sep 29, 2015 8:25 AM, "Anne Archibald" wrote: > > > > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. > Why should it be different for object arrays? > > The argument for

Re: [Numpy-discussion] Sign of NaN

2015-09-29 Thread josef.pktd
On Tue, Sep 29, 2015 at 2:16 PM, Nathaniel Smith wrote: > On Sep 29, 2015 8:25 AM, "Anne Archibald" wrote: > > > > IEEE 754 has signum(NaN)->NaN. So does np.sign on floating-point arrays. > Why should it be different for object arrays? > > The argument for