Re: [Numpy-discussion] formatting issues, locale and co

2008-12-30 Thread David Cournapeau
On Wed, Dec 31, 2008 at 11:28 AM, Pauli Virtanen wrote: > Mon, 29 Dec 2008 13:38:12 +0900, David Cournapeau wrote: > [clip] >> I put my yesterday work in the fix_float_format branch: >> - it fixes the locale issue >> - it fixes the long double issue on windows. >> - it also fixes some tests (we

Re: [Numpy-discussion] formatting issues, locale and co

2008-12-30 Thread David Cournapeau
On Wed, Dec 31, 2008 at 3:41 AM, Lenard Lindstrom wrote: > David Cournapeau wrote: >> The thing is since I don't understand what happens in the print '%f' >> case, I don't know how to clean it up, if it is at all possible. But in >> anyway, it means that with my changes, we are not worse than pyth

Re: [Numpy-discussion] formatting issues, locale and co

2008-12-30 Thread Pauli Virtanen
Mon, 29 Dec 2008 13:38:12 +0900, David Cournapeau wrote: [clip] > I put my yesterday work in the fix_float_format branch: > - it fixes the locale issue > - it fixes the long double issue on windows. > - it also fixes some tests (we were not testing single precision >formatting but twice dou

Re: [Numpy-discussion] "False" and "True" not singletons?

2008-12-30 Thread Pauli Virtanen
Tue, 30 Dec 2008 14:17:30 -0800, Christopher Barker wrote: > Robert Kern wrote: >> Well, True and False are singletons, > > I thought so. > >> but numpy.any() and numpy.all() >> don't return bools. They return numpy.bool_s. > > Is that a numpy scalar type? > > This also begs the question: why

Re: [Numpy-discussion] "False" and "True" not singletons?

2008-12-30 Thread Christopher Barker
Robert Kern wrote: > Well, True and False are singletons, I thought so. > but numpy.any() and numpy.all() > don't return bools. They return numpy.bool_s. Is that a numpy scalar type? This also begs the question: why don't they return regular old True and False? -CHB -- Christopher Barker

Re: [Numpy-discussion] "False" and "True" not singletons?

2008-12-30 Thread Robert Kern
On Tue, Dec 30, 2008 at 14:59, Christopher Barker wrote: > Hi all, > > I've just discovered that "False" is not a singleton: > > >>> import numpy as N > > >>> f = N.all((1,2,0)) > >>> print f > False > >>> id(f) > 17316364 > >>> f is False > False > >>> id(False) > 3294768 > > > Should it be

Re: [Numpy-discussion] "False" and "True" not singletons?

2008-12-30 Thread josef . pktd
On Tue, Dec 30, 2008 at 2:59 PM, Christopher Barker wrote: > Hi all, > > I've just discovered that "False" is not a singleton: > > >>> import numpy as N > > >>> f = N.all((1,2,0)) > >>> print f > False > >>> id(f) > 17316364 > >>> f is False > False > >>> id(False) > 3294768 > > > Should it

[Numpy-discussion] "False" and "True" not singletons?

2008-12-30 Thread Christopher Barker
Hi all, I've just discovered that "False" is not a singleton: >>> import numpy as N >>> f = N.all((1,2,0)) >>> print f False >>> id(f) 17316364 >>> f is False False >>> id(False) 3294768 Should it be? This arose for me in some tests I'm using that check if a result is False: self.fail

Re: [Numpy-discussion] formatting issues, locale and co

2008-12-30 Thread Lenard Lindstrom
David Cournapeau wrote: > The thing is since I don't understand what happens in the print '%f' > case, I don't know how to clean it up, if it is at all possible. But in > anyway, it means that with my changes, we are not worse than python > itself, and I think we are better than before, > > Just

Re: [Numpy-discussion] numpy.test() failures (1.2.1) on Mac OS X

2008-12-30 Thread Nicholas Matsakis
On Tue, 30 Dec 2008, Nicholas Matsakis wrote: > I just installed what I believe to be a completely vanilla installation of > numpy on an Intel Mac OS X 10.5.6. Python 2.5 pkg from Python.org, numpy > 1.2.1 pkg from scipy.org, nose installed through setup tools. Running > "import numpy; numpy.te

Re: [Numpy-discussion] combining recarrays

2008-12-30 Thread Keith Goodman
On Tue, Dec 30, 2008 at 10:10 AM, ctw wrote: > Hi! > > I'm a bit stumped by the following: suppose I have several recarrays > with identical dtypes (identical field names, etc.) and would like to > combine them into one rec array, what would be the best way to do > that? I tried using np.rec.fromr

[Numpy-discussion] combining recarrays

2008-12-30 Thread ctw
Hi! I'm a bit stumped by the following: suppose I have several recarrays with identical dtypes (identical field names, etc.) and would like to combine them into one rec array, what would be the best way to do that? I tried using np.rec.fromrecords, but that doesn't produce the desired result. As a

[Numpy-discussion] numpy.test() failures (1.2.1) on Mac OS X

2008-12-30 Thread Nicholas Matsakis
I just installed what I believe to be a completely vanilla installation of numpy on an Intel Mac OS X 10.5.6. Python 2.5 pkg from Python.org, numpy 1.2.1 pkg from scipy.org, nose installed through setup tools. Running "import numpy; numpy.test()" results in the following errors and failures:

Re: [Numpy-discussion] Alternative to record array

2008-12-30 Thread Francesc Alted
A Tuesday 30 December 2008, Francesc Alted escrigué: > A Monday 29 December 2008, Jean-Baptiste Rudant escrigué: [snip] > > The difference for both approaches is that the row-wise arrangement > is more efficient when data is iterated by field, while the > column-wise one is more efficient when data