Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
Pierre GM wrote: > A bit of background first; > In the first implementations of numpy.core.ma, the approach was to get rid of > the data that could cause problem beforehand by replacing them with safe > values. Turned out that finding these data is not always obvious (cf the > problem of definin

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Pierre GM
On Dec 7, 2009, at 11:15 PM, David Cournapeau wrote: > Charles R Harris wrote: >>No, it is a consequence of errors being set to ignored in numpy.ma >>: Oopsie... A bit of background first; In the first implementations of numpy.core.ma, the approach was to get rid of the

Re: [Numpy-discussion] Assigning complex values to a real array

2009-12-07 Thread David Warde-Farley
On 7-Dec-09, at 11:13 PM, Dr. Phillip M. Feldman wrote: > Example #1: > IPython 0.10 [on Py 2.5.4] > [~]|1> z= zeros(3) > [~]|2> z[0]= 1+1J > > TypeError: can't convert complex to float; use abs(z) The problem is that you're using Python's built-in complex type, and it responds to type coerci

[Numpy-discussion] Py3k: including npy_config.h outside numpy.core

2009-12-07 Thread David Cournapeau
Hi, I have noticed that now some code outside numpy/core uses npy_config.h. As suggested by its location (numpy/core/src/private), it is specific to numpy/core, and should not be used outside. What's the rationale to use npy_config.h in numpy/core ? cheers, David ___

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread josef . pktd
On Mon, Dec 7, 2009 at 11:54 PM, David Cournapeau wrote: > josef.p...@gmail.com wrote: >> >> warning is no problem, but I haven't figured out what the pattern is >> for repeated warnings. >> > > By default, warnings are only 'raised' once. You need to use the > standard warnings module to control

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
josef.p...@gmail.com wrote: > > warning is no problem, but I haven't figured out what the pattern is > for repeated warnings. > By default, warnings are only 'raised' once. You need to use the standard warnings module to control the behavior (always warn, raise, etc...). Look for the simplefilt

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread josef . pktd
On Mon, Dec 7, 2009 at 11:22 PM, David Cournapeau wrote: > josef.p...@gmail.com wrote: >> On Mon, Dec 7, 2009 at 1:24 PM, Charles R Harris >> wrote: >> >>> On Mon, Dec 7, 2009 at 11:16 AM, Charles R Harris >>> wrote: >>> On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau wrote: >>

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
josef.p...@gmail.com wrote: > On Mon, Dec 7, 2009 at 1:24 PM, Charles R Harris > wrote: > >> On Mon, Dec 7, 2009 at 11:16 AM, Charles R Harris >> wrote: >> >>> On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau >>> wrote: >>> On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris >>

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
Charles R Harris wrote: > > > On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau > wrote: > > On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris > mailto:charlesr.har...@gmail.com>> wrote: > > > > > > On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau >

Re: [Numpy-discussion] Assigning complex values to a real array

2009-12-07 Thread Dr. Phillip M. Feldman
Robert Kern-2 wrote: > > > > Downcasting data is a necessary operation sometimes. We explicitly > made a choice a long time ago to allow this. > > Robert Kern > > This might be the time to recognize that that was a bad choice and reverse it. It is not clear to me why downcasting from comp

Re: [Numpy-discussion] Assigning complex values to a real array

2009-12-07 Thread Dr. Phillip M. Feldman
Robert Kern-2 wrote: > > > > Downcasting data is a necessary operation sometimes. We explicitly > made a choice a long time ago to allow this. > > Robert Kern > > This might be the time to recognize that that was a bad choice and reverse it. It is not clear to me why downcasting from comp

Re: [Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread Skipper Seabold
On Mon, Dec 7, 2009 at 7:47 PM, Pierre GM wrote: > On Dec 7, 2009, at 7:12 PM, Skipper Seabold wrote: >> On Mon, Dec 7, 2009 at 7:00 PM, John [H2O] wrote: >>> >>> Hello (Pierre?), >>> >>> I'm trying to work more with structured arrays, which at times seems great, >>> and at others (due to my lack

Re: [Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread Pierre GM
On Dec 7, 2009, at 7:12 PM, Skipper Seabold wrote: > On Mon, Dec 7, 2009 at 7:00 PM, John [H2O] wrote: >> >> Hello (Pierre?), >> >> I'm trying to work more with structured arrays, which at times seems great, >> and at others (due to my lack of familiarity) very frustrating. Like Robert said, yo

Re: [Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread Skipper Seabold
On Mon, Dec 7, 2009 at 7:00 PM, John [H2O] wrote: > > Hello (Pierre?), > > I'm trying to work more with structured arrays, which at times seems great, > and at others (due to my lack of familiarity) very frustrating. > Sounds familiar... > Anyway, right now I'm writing a bit of code to read a se

Re: [Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread Robert Kern
On Mon, Dec 7, 2009 at 18:00, John [H2O] wrote: > > Hello (Pierre?), > > I'm trying to work more with structured arrays, which at times seems great, > and at others (due to my lack of familiarity) very frustrating. > > Anyway, right now I'm writing a bit of code to read a series of files with > x,

[Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread John [H2O]
Hello (Pierre?), I'm trying to work more with structured arrays, which at times seems great, and at others (due to my lack of familiarity) very frustrating. Anyway, right now I'm writing a bit of code to read a series of files with x,y,z data. I'm creating record arrays for each file a read. Onc

Re: [Numpy-discussion] numpy.test() failures

2009-12-07 Thread Pauli Virtanen
ma, 2009-12-07 kello 22:36 +0100, Nils Wagner kirjoitti: > >>> numpy.__version__ > '1.5.0.dev7980' > > FAIL: test_buffer_hashlib (test_regression.TestRegression) Thx, fixed. I forgot about defaulting to int64. Pauli ___ NumPy-Discussion maili

[Numpy-discussion] numpy.test() failures

2009-12-07 Thread Nils Wagner
>>> numpy.__version__ '1.5.0.dev7980' FAIL: test_buffer_hashlib (test_regression.TestRegression) -- Traceback (most recent call last): File "/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/tests/test_regression.p

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread josef . pktd
On Mon, Dec 7, 2009 at 1:24 PM, Charles R Harris wrote: > > > On Mon, Dec 7, 2009 at 11:16 AM, Charles R Harris > wrote: >> >> >> On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau >> wrote: >>> >>> On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris >>> wrote: >>> > >>> > >>> > On Mon, Dec 7, 2009

[Numpy-discussion] 1.4.0rc: Failing regression test on Solaris/SPARC

2009-12-07 Thread Michael Droettboom
We've got 2 failing regression tests left on Solaris/SPARC, with the same apparent root cause (a difference in out-of-domain handling in asin and friends). Would anyone (particularly someone familiar with masked arrays) be able to look at #1173 to confirm that my suggested fix is correct? htt

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Charles R Harris
On Mon, Dec 7, 2009 at 11:16 AM, Charles R Harris wrote: > > > On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau wrote: > >> On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau >> wrote: >> >> >> >> Hi, >> >> >> >> There are

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Charles R Harris
On Mon, Dec 7, 2009 at 10:31 AM, David Cournapeau wrote: > On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris > wrote: > > > > > > On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau > wrote: > >> > >> Hi, > >> > >> There are a few issues which have been found on numpy 1.4.0, which worry > >> me: > >

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
On Tue, Dec 8, 2009 at 1:48 AM, Charles R Harris wrote: > > > On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau wrote: >> >> Hi, >> >> There are a few issues which have been found on numpy 1.4.0, which worry >> me: >> >> # 1317: segfaults for integer division overflow >> # 1318: all FPU exceptions

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Travis Oliphant
-- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Dec 7, 2009, at 10:48 AM, Charles R Harris wrote: On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau wrote: Hi, There are a few issues which have been found on numpy 1.4.0, which worry m

Re: [Numpy-discussion] Py3 merge

2009-12-07 Thread Michael Droettboom
Pauli Virtanen wrote: > ma, 2009-12-07 kello 09:50 -0500, Michael Droettboom kirjoitti: > >> Pauli Virtanen wrote: >> > [clip] > >>> The character 'B' is already by unsigned bytes -- I wonder if it's easy >>> to support 'B123' and plain 'B' at the same time, or whether we have to >>> pic

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Skipper Seabold
On Mon, Dec 7, 2009 at 11:48 AM, Charles R Harris wrote: > > > On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau wrote: >> >> Hi, >> >> There are a few issues which have been found on numpy 1.4.0, which worry >> me: >> >> # 1317: segfaults for integer division overflow >> # 1318: all FPU exception

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread Charles R Harris
On Mon, Dec 7, 2009 at 8:24 AM, David Cournapeau wrote: > Hi, > > There are a few issues which have been found on numpy 1.4.0, which worry > me: > > # 1317: segfaults for integer division overflow > # 1318: all FPU exceptions ignored by default > > #1318 worries me the most: I think it is a prett

Re: [Numpy-discussion] np.equal

2009-12-07 Thread Charles R Harris
On Mon, Dec 7, 2009 at 12:01 AM, Fernando Perez wrote: > 2009/12/6 josef.pktd : > np.equal(np.arange(5),'a') > > NotImplemented > > Why is NotImplemented a *return* value? Normally NotImplementedError > NotImplemented and NotImplementedError are different things. The first is a message to t

Re: [Numpy-discussion] Py3 merge

2009-12-07 Thread Pauli Virtanen
ma, 2009-12-07 kello 09:50 -0500, Michael Droettboom kirjoitti: > Pauli Virtanen wrote: [clip] > > The character 'B' is already by unsigned bytes -- I wonder if it's easy > > to support 'B123' and plain 'B' at the same time, or whether we have to > > pick a different letter for "byte strings". 'y'

[Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-07 Thread David Cournapeau
Hi, There are a few issues which have been found on numpy 1.4.0, which worry me: # 1317: segfaults for integer division overflow # 1318: all FPU exceptions ignored by default #1318 worries me the most: I think it is a pretty serious regression, since things like this go unnoticed: x = np.array(

Re: [Numpy-discussion] Py3 merge

2009-12-07 Thread Michael Droettboom
Pauli Virtanen wrote: > ma, 2009-12-07 kello 09:12 -0500, Michael Droettboom kirjoitti: > >>> We need character arrays for the astro people. I assume these will be >>> byte arrays. Maybe Michael will weigh in here. >>> >> I can't find in the thread where removing byte arrays (meaning arr

Re: [Numpy-discussion] Py3 merge

2009-12-07 Thread Pauli Virtanen
ma, 2009-12-07 kello 09:12 -0500, Michael Droettboom kirjoitti: > > We need character arrays for the astro people. I assume these will be > > byte arrays. Maybe Michael will weigh in here. > > I can't find in the thread where removing byte arrays (meaning arrays of > fixed-length non-unicode stri

Re: [Numpy-discussion] Chararray depreciated?

2009-12-07 Thread Pauli Virtanen
ma, 2009-12-07 kello 09:17 -0500, Michael Droettboom kirjoitti: > Also noticed that > > http://docs.scipy.org/numpy/docs/numpy.core.defchararray.chararray/ > [clip] > I suspect fixing this at the implementation level may be too > difficult/dangerous, but for documentation purposes, is there a way

Re: [Numpy-discussion] Chararray depreciated?

2009-12-07 Thread Michael Droettboom
Also noticed that http://docs.scipy.org/numpy/docs/numpy.core.defchararray.chararray/ lists a number of methods that are really applicable. For example "sum". This is a side effect of course of chararray inheriting from ndarray, and the documentation isn't "wrong" -- chararray has a "sum" me

Re: [Numpy-discussion] Py3 merge

2009-12-07 Thread Michael Droettboom
Charles R Harris wrote: > > > > We need character arrays for the astro people. I assume these will be > byte arrays. Maybe Michael will weigh in here. I can't find in the thread where removing byte arrays (meaning arrays of fixed-length non-unicode strings) was suggested -- though changing the d

Re: [Numpy-discussion] np.equal

2009-12-07 Thread Michael Droettboom
There was some discussion on this recently. "==" actually has special fall-back code for strings, whereas "equal" is just a "raw" ufunc, and no ufunc's support strings. http://www.mail-archive.com/numpy-discussion@scipy.org/msg21408.html Of course bool(NotImplemented) == True is sort of a sepa

Re: [Numpy-discussion] Chararray depreciated?

2009-12-07 Thread Michael Droettboom
If this: http://docs.scipy.org/numpy/docs/numpy.core.defchararray.chararray/ is the most recent revision, then it looks good to me. It does seem to incorporate my new text -- in case there was any confusion about that. Mike David Goldsmith wrote: > On Sun, Dec 6, 2009 at 6:36 AM, Ralf Gommers

Re: [Numpy-discussion] Help to port numpy to python3?

2009-12-07 Thread Dag Sverre Seljebotn
Pauli Virtanen wrote: > 2) Figure out how to test the PEP 3118 buffer interface on Python 2.6 >and Python 3.1 > >Write unit tests for it. > On that note, I gave that a very small start in August. The two files are here -- one is a Cython file wrapping the part of the PyBuffer API that

Re: [Numpy-discussion] Test of numpy/py3k

2009-12-07 Thread Nadav Horesh
Thanks, it works. Nadav On Mon, 2009-12-07 at 11:33 +0200, Pauli Virtanen wrote: > Hi, > > ma, 2009-12-07 kello 10:36 +0200, Nadav Horesh kirjoitti: > > I would like to test and prepare for migration of numpy/python3.1 on a > > linux box. > > Can anyone provide an installation recipe (and mayb

Re: [Numpy-discussion] SIGFPE handling in ufunc

2009-12-07 Thread David Cournapeau
David Cournapeau wrote: > Note that no warning is raised - this seems to be a regression, since I > came across e.g. this ticket: http://projects.scipy.org/numpy/ticket/541. > Ok, this is broken since 1.1.0 (r4778 to be exact), and the reason is the MaskedArray support - there are some global s

Re: [Numpy-discussion] np.equal

2009-12-07 Thread Pauli Virtanen
su, 2009-12-06 kello 23:01 -0800, Fernando Perez kirjoitti: > 2009/12/6 josef.pktd : > np.equal(np.arange(5),'a') > > NotImplemented > > Why is NotImplemented a *return* value? Normally NotImplementedError > is a raised exception, but if it's not implemented, it shouldn't be > returned as a

Re: [Numpy-discussion] Test of numpy/py3k

2009-12-07 Thread Pauli Virtanen
Hi, ma, 2009-12-07 kello 10:36 +0200, Nadav Horesh kirjoitti: > I would like to test and prepare for migration of numpy/python3.1 on a linux > box. > Can anyone provide an installation recipe (and maybe some more tips)? It should already "work out of the box": 1) Install Python 3 2) Install No

[Numpy-discussion] SIGFPE handling in ufunc

2009-12-07 Thread David Cournapeau
Hi, While investigating why np.array([0]) ** -1/-1 crashes, I wondered about how signal handling is supposed to work in ufuncs when a SIGFPE is raised. In particular, the following is puzzling: import numpy as np x = np.array([1, 2, 3, 4]) / 0 # x is now array([0, 0, 0, 0]) Note that no warning

[Numpy-discussion] Test of numpy/py3k

2009-12-07 Thread Nadav Horesh
I would like to test and prepare for migration of numpy/python3.1 on a linux box. Can anyone provide an installation recipe (and maybe some more tips)? Nadav. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/