Re: [Numpy-discussion] numpy.int32, type inheritance and tp_flags

2009-06-02 Thread Charles R Harris
On Mon, Jun 1, 2009 at 11:50 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Mon, Jun 1, 2009 at 11:08 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp mailto:da...@ar.media.kyoto-u.ac.jp wrote: Hi, I have a question related to

Re: [Numpy-discussion] numpy.int32, type inheritance and tp_flags

2009-06-02 Thread David Cournapeau
Charles R Harris wrote: On Mon, Jun 1, 2009 at 11:08 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp mailto:da...@ar.media.kyoto-u.ac.jp wrote: Hi, I have a question related to #1121 (http://projects.scipy.org/numpy/ticket/1121). With python 2.6, PyInt_Check(a) if a

[Numpy-discussion] Multiplying Python float to numpy.array of objects works but fails with a numpy.float64, numpy Bug?

2009-06-02 Thread Sebastian Walter
Hello, Multiplying a Python float to a numpy.array of objects works flawlessly but not with a numpy.float64 . I tried numpy version '1.0.4' on a 32 bit Linux and '1.2.1' on a 64 bit Linux: both raise the same exception. Is this a (known) bug? -- test.py

Re: [Numpy-discussion] Single precision equivalents of missing C99 functions

2009-06-02 Thread Francesc Alted
A Monday 01 June 2009 20:26:27 Charles R Harris escrigué: I suppose that the NumPy crew already experimented this divergence and finally used the cast approach for computing the single precision functions. It was inherited and was no doubt the simplest approach at the time. It has always

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
On Tue, Jun 2, 2009 at 12:37 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robert Kern wrote: This does not solve the C function problem (PyArray_Correlate). The easy solution would be to keep the current C version, deal with the problem in python for acorrelate for the time being,

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread Robin
On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@gmail.com wrote: Done in r7031 - correlate/PyArray_Correlate should be unchanged, and acorrelate/PyArray_Acorrelate implement the conventional definitions, I don't know if it's been discussed before but while people are thinking

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@gmail.com wrote: Done in r7031 - correlate/PyArray_Correlate should be unchanged, and acorrelate/PyArray_Acorrelate implement the conventional definitions, I don't know if it's been discussed before but while

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread Ryan May
On Tue, Jun 2, 2009 at 5:59 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@gmail.com wrote: Done in r7031 - correlate/PyArray_Correlate should be unchanged, and acorrelate/PyArray_Acorrelate implement the

Re: [Numpy-discussion] Multiplying Python float to numpy.array of objects works but fails with a numpy.float64, numpy Bug?

2009-06-02 Thread Keith Goodman
On Tue, Jun 2, 2009 at 1:42 AM, Sebastian Walter sebastian.wal...@gmail.com wrote: Hello, Multiplying a Python float to a numpy.array of objects works flawlessly but not with a numpy.float64 . I tried  numpy version '1.0.4' on a 32 bit Linux and  '1.2.1' on a 64 bit Linux: both raise the same

Re: [Numpy-discussion] Multiplying Python float to numpy.array of objects works but fails with a numpy.float64, numpy Bug?

2009-06-02 Thread Darren Dale
On Tue, Jun 2, 2009 at 10:09 AM, Keith Goodman kwgood...@gmail.com wrote: On Tue, Jun 2, 2009 at 1:42 AM, Sebastian Walter sebastian.wal...@gmail.com wrote: Hello, Multiplying a Python float to a numpy.array of objects works flawlessly but not with a numpy.float64 . I tried numpy

Re: [Numpy-discussion] Multiplying Python float to numpy.array of objects works but fails with a numpy.float64, numpy Bug?

2009-06-02 Thread Sebastian Walter
On Tue, Jun 2, 2009 at 4:18 PM, Darren Dale dsdal...@gmail.com wrote: On Tue, Jun 2, 2009 at 10:09 AM, Keith Goodman kwgood...@gmail.com wrote: On Tue, Jun 2, 2009 at 1:42 AM, Sebastian Walter sebastian.wal...@gmail.com wrote: Hello, Multiplying a Python float to a numpy.array of objects

[Numpy-discussion] ANN: Numexpr 1.3 released

2009-06-02 Thread Francesc Alted
Announcing Numexpr 1.3 Numexpr is a fast numerical expression evaluator for NumPy. With it, expressions that operate on arrays (like 3*a+4*b) are accelerated and use less memory than doing the same calculation in Python. On this release, and

Re: [Numpy-discussion] numpy issues at startup

2009-06-02 Thread Robert Kern
On Tue, Jun 2, 2009 at 13:19, Turner, Todd J Civ USAF AFMC AFRL/RXLMP todd.tur...@wpafb.af.mil wrote: I’m having some numpy problems when using the package with Python.  My admin installed numpy for me and we think it’s installed right.  When I’m in python and type ‘import numpy’ I get the

Re: [Numpy-discussion] numpy issues at startup

2009-06-02 Thread Turner, Todd J Civ USAF AFMC AFRL/RXLMP
All right, here goes... print numpy.__file__ /home/d1/turnertj/Python-2.5.4/lib/python2.5/site-packages/numpy/numpy/__init__.pyc [turne...@daneel numpy]$ ls add_newdocs.py ctypeslib.pyc dual.py _import_tools.py libnumarray setup.py tests coredistutils f2py

Re: [Numpy-discussion] numpy issues at startup

2009-06-02 Thread Robert Kern
On Tue, Jun 2, 2009 at 13:35, Turner, Todd J Civ USAF AFMC AFRL/RXLMP todd.tur...@wpafb.af.mil wrote: All right, here goes... print numpy.__file__ /home/d1/turnertj/Python-2.5.4/lib/python2.5/site-packages/numpy/numpy/__init__.pyc That looks like it was definitely installed incorrectly, then.

[Numpy-discussion] Making NpzFiles behave more like dictionaries.

2009-06-02 Thread David Warde-Farley
Hi, It's occasionally annoyed me that NpzFiles can't be swapped in transparently for an in-memory dictionary since getting at the keys requires an attribute access. Below is a patch that implements some more of the dictionary interface for the NpzFile class. Any comments as to whether

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread rob steed
I also think that the conjugate should be taken. I spent the last few weeks using correlate to experiment with signal processing and I got strange results until I realised that I had to manually take the conjugate. It would also be good if the function did it since applying the conjugate to

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Charles R Harris
On Mon, Jun 1, 2009 at 8:43 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at 21:37, josef.p...@gmail.com wrote: how do we catch a multiarray.error in a try except clause? e.g. np.argmin([]) Traceback (most recent call last): File pyshell#147, line 1, in module

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
Charles R Harris wrote: I also think that having weighting options would be good. I now understand the complexities of the various weightings that can be applied to the correlation i.e. biased vs unbiased but I think that having correlate include these options might

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Robert Kern
On Tue, Jun 2, 2009 at 21:20, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 8:43 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at 21:37,  josef.p...@gmail.com wrote: how do we catch a multiarray.error in a try except clause? e.g.

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread josef . pktd
On Tue, Jun 2, 2009 at 10:25 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 21:20, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 8:43 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at 21:37,  josef.p...@gmail.com wrote: how

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Charles R Harris
On Tue, Jun 2, 2009 at 8:25 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 21:20, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 8:43 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at 21:37, josef.p...@gmail.com wrote:

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Robert Kern
On Tue, Jun 2, 2009 at 21:41, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Jun 2, 2009 at 8:25 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 21:20, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 8:43 PM, Robert Kern

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Charles R Harris
On Tue, Jun 2, 2009 at 8:59 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 21:41, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Jun 2, 2009 at 8:25 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 21:20, Charles R Harris

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Robert Kern
On Tue, Jun 2, 2009 at 22:21, Charles R Harris charlesr.har...@gmail.com wrote: OK. I left the strings exposed in the modules with a fixme notes. Do you think they should be removed while we are at it? I think they should be replaced with the Exception classes that are being raised in their

Re: [Numpy-discussion] how can one catch a multiarray.error

2009-06-02 Thread Charles R Harris
On Tue, Jun 2, 2009 at 9:22 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 2, 2009 at 22:21, Charles R Harris charlesr.har...@gmail.com wrote: OK. I left the strings exposed in the modules with a fixme notes. Do you think they should be removed while we are at it? I think they