Re: [Numpy-discussion] performance of the numpy

2008-09-25 Thread Matthieu Brucher
From my understanding, using the modulename.functionname will slow down the python performance. For a big simulation, it may not be a good idear. The slowdown is very small (I'd say inferior to a ms), it's nothing compared to the way you're doing your computations. Matthieu -- French PhD

[Numpy-discussion] numpy.complex* functions do not call the __complex__ method

2008-09-25 Thread jason-sage
In creating an array of type numpy.complex128, I'm having problems passing in Sage types that should be considered complex numbers since they implement the standard __complex__ method. However, numpy doesn't recognize that. Here's a minimal example: In [1]: class MyNum: ...: def

Re: [Numpy-discussion] performance of the numpy

2008-09-25 Thread David Cournapeau
On Thu, Sep 25, 2008 at 9:36 AM, frank wang [EMAIL PROTECTED] wrote: Hi, All, I am using ipython with --pylab flag. ipython loads the numpy into the workspace, so I do not know abs is from python or numpy. The weird thing is if I execute the code line by line, I do not have any speed problem.

Re: [Numpy-discussion] loadtxt error

2008-09-25 Thread Stéfan van der Walt
2008/9/24 frank wang [EMAIL PROTECTED]: Thank you very much for all of you. I have downloaded the binary version 1.2rc and it fixed the problem. My special thanks to the person who created the window binary version for users who do not know or do not have the capacity to build the numpy from

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-25 Thread Vincent Schut
Pierre GM wrote: Vincent, You should really consider putting an example next time. I must admit that I'm not sure what you're trying to do, and where/why it fails. Pierre, sorry for that, I was posting hastily before leaving work, and was myself pretty confused about ma's behaviour on

[Numpy-discussion] Standard functions (z-score) on nan (again)

2008-09-25 Thread Peter Saffrey
I've bodged my way through my median problems (see previous postings). Now I need to take a z-score of an array that might contain nans. At the moment, if the array, which is 7000 elements, contains 1 nan or more, all the results come out as nan. My other problem is that my array is indexed from

Re: [Numpy-discussion] PyArray_SETITEM macro ends in semicolon

2008-09-25 Thread Dag Sverre Seljebotn
[EMAIL PROTECTED] wrote: I'm working on getting the Sage matrices for real/complex doubles to use numpy as a backend. In this, I'm using the PyArray_SETITEM macro from within Cython. However, Cython wraps the macro in a function call to convert the output to a Python value: __pyx_1 =

Re: [Numpy-discussion] numpy.complex* functions do not call the __complex__ method

2008-09-25 Thread Neal Becker
[EMAIL PROTECTED] wrote: In creating an array of type numpy.complex128, I'm having problems passing in Sage types that should be considered complex numbers since they implement the standard __complex__ method. However, numpy doesn't recognize that. Here's a minimal example: I had tried

Re: [Numpy-discussion] 1.2.0rc2 tagged! --PLEASE TEST--

2008-09-25 Thread jh
I hope you'll grab the updated docstrings before tagging. At least grab numpy.__doc__. The main numpy help string didn't adequately point users to alternatives to help() for the ufuncs. --jh-- ___ Numpy-discussion mailing list

Re: [Numpy-discussion] performance of the numpy

2008-09-25 Thread Nadav Horesh
I might bot be a bug, since in numpy abs is a synonym to absolute. So it is possible that in one case the python's abs is called, and in the other case it's the numpy's. An explicit example should help to clarify the problem. Nadav. -הודעה מקורית- מאת: [EMAIL PROTECTED] בשם David

[Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread thorsten
I've been trying to install numpy on my linux system and get the following error message whey I try to import it: Python 2.4.3 (#1, Apr 22 2006, 18:02:44) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-54)] on linux2 Type help, copyright, credits or license for more information. import numpy

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread David Cournapeau
[EMAIL PROTECTED] wrote: Is there a way to fix this? Which blas/lapack did you use ? Did you built it by yourself, or are you using the one packaged by your OS vendor ? cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread thorsten
David, I built it myself from source about 2 years ago. Has it changed much? Thanks for answering so quickly! John On Fri, 26 Sep 2008, David Cournapeau wrote: [EMAIL PROTECTED] wrote: Is there a way to fix this? Which blas/lapack did you use ? Did you built it

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread David Cournapeau
[EMAIL PROTECTED] wrote: David, I built it myself from source about 2 years ago. Has it changed much? It has not changed at all, but your compiler has, and they are not ABI compatible, or maybe you made an error when installing numpy. Which compiler did you use to build BLAS/LAPACK (g77 or

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread thorsten
On Fri, 26 Sep 2008, David Cournapeau wrote: [EMAIL PROTECTED] wrote: David, I built it myself from source about 2 years ago. Has it changed much? It has not changed at all, but your compiler has, and they are not ABI compatible, or maybe you made an error when installing numpy.

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread David Cournapeau
[EMAIL PROTECTED] wrote: g77, it appears. This is a somewhat older Red Hat Enterprise Linux system, before they switched over to gfortran. You can't mix both compilers. You have to use either one of them to build *everything*: blas, lapack, numpy (scipy, etc...). g77 and gfortran are not ABI

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-25 Thread Pierre GM
Vincent, The argument of speed (having a default mask of nomask) applies only to the computations inside MaskedArray. Of course, it is still far faster not to use masks but only ndarrays. Just for clarity, to rephrase my question: how do I force ma to give me (always/by default/by some

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread thorsten
On Fri, 26 Sep 2008, David Cournapeau wrote: [EMAIL PROTECTED] wrote: g77, it appears. This is a somewhat older Red Hat Enterprise Linux system, before they switched over to gfortran. You can't mix both compilers. You have to use either one of them to build *everything*: blas, lapack,

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread Charles R Harris
On Thu, Sep 25, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote: On Fri, 26 Sep 2008, David Cournapeau wrote: [EMAIL PROTECTED] wrote: g77, it appears. This is a somewhat older Red Hat Enterprise Linux system, before they switched over to gfortran. You can't mix both compilers. You

Re: [Numpy-discussion] 1.2.0rc2 tagged! --PLEASE TEST--

2008-09-25 Thread Jarrod Millman
On Thu, Sep 25, 2008 at 7:19 AM, [EMAIL PROTECTED] wrote: I hope you'll grab the updated docstrings before tagging. At least grab numpy.__doc__. The main numpy help string didn't adequately point users to alternatives to help() for the ufuncs. That will have to wait until 1.2.1, which we

Re: [Numpy-discussion] A basic question about swig and Numeric

2008-09-25 Thread Russell E. Owen
In article [EMAIL PROTECTED], Michel Dupront [EMAIL PROTECTED] wrote: Hello, I am trying to use Numeric and swig but it seems that there are few points that I don't understand. The only excuse I have is that I am new to these tools. I have a simple example that I cannot make work the

Re: [Numpy-discussion] numpy.complex* functions do not call the __complex__ method

2008-09-25 Thread jason-sage
Neal Becker wrote: [EMAIL PROTECTED] wrote: In creating an array of type numpy.complex128, I'm having problems passing in Sage types that should be considered complex numbers since they implement the standard __complex__ method. However, numpy doesn't recognize that. Here's a minimal

[Numpy-discussion] F2PY errors still exist

2008-09-25 Thread Blubaugh, David A.
To All, I am now trying to use the visual compaq compiler. I am legally required to utilize this compiler for my employment. I have tried the following: C:\Python25\ScriptsC:\python25\python f2py.py -c --fcompiler=compaqv -m hello hello.f90 I was wondering as to if I should input

Re: [Numpy-discussion] Standard functions (z-score) on nan (again)

2008-09-25 Thread Anne Archibald
2008/9/25 Peter Saffrey [EMAIL PROTECTED]: I've bodged my way through my median problems (see previous postings). Now I need to take a z-score of an array that might contain nans. At the moment, if the array, which is 7000 elements, contains 1 nan or more, all the results come out as nan.

Re: [Numpy-discussion] F2PY errors still exist (possible solution)

2008-09-25 Thread Blubaugh, David A.
To All, I can now see as to where the error lies. I apologize for my poor eye sight. The error lies in me using Compaq Visual Fortran 6.0. The error listed from f2py.py after I enter the following commands are the following: Commands Entered C:\Python25\ScriptsC:\python25\python

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread thorsten
On Thu, 25 Sep 2008, Charles R Harris wrote: On Thu, Sep 25, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote: On Fri, 26 Sep 2008, David Cournapeau wrote: [EMAIL PROTECTED] wrote: g77, it appears. This is a somewhat older Red Hat Enterprise Linux system, before they switched over

[Numpy-discussion] Bug fix or behavior change?

2008-09-25 Thread Charles R Harris
Hi All, Currently subtract for boolean arrays is defined in /**begin repeat * Arithmetic operators * * # OP = ||, ^, # * #kind = add, subtract, multiply# */ static void [EMAIL PROTECTED]@(char **args, intp *dimensions, intp *steps, void *func) { register intp i; intp

Re: [Numpy-discussion] PyArray_SETITEM macro ends in semicolon

2008-09-25 Thread jason-sage
Dag Sverre Seljebotn wrote: [EMAIL PROTECTED] wrote: I'm working on getting the Sage matrices for real/complex doubles to use numpy as a backend. In this, I'm using the PyArray_SETITEM macro from within Cython. However, Cython wraps the macro in a function call to convert the output

Re: [Numpy-discussion] lsame_ undefined ...

2008-09-25 Thread David Cournapeau
[EMAIL PROTECTED] wrote: There appears to be only one. I had attempted an install of scipy at one point, which might have brought something else along, but running find from the top of the directory tree shows only a single copy as far as I can tell. Something went wrong somewhere,

[Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-25 Thread David Cournapeau
Hi, We started a small document to gather all information given in previous threads about NaN handling in max and co in numpy. Thanks to Anne (Archibald) for useful comments/additions/typo corrections: http://projects.scipy.org/scipy/numpy/wiki/ProperNanHandling We describe approaches taken

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-25 Thread Charles R Harris
On Thu, Sep 25, 2008 at 10:15 PM, David Cournapeau [EMAIL PROTECTED] wrote: Hi, We started a small document to gather all information given in previous threads about NaN handling in max and co in numpy. Thanks to Anne (Archibald) for useful comments/additions/typo corrections:

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-25 Thread David Cournapeau
Charles R Harris wrote: I'm also wondering about the sign ufunc. It should probably return nan for nans, but -1,0,1 are the current values. We also need to decide which end of the sorted values the nans should go to. I'm a bit partial to the beginning but the end would be fine with me, it