Re: [Numpy-discussion] (apparent) infinite loop in LAPACK/ATLAS

2009-11-04 Thread David Cournapeau
On Wed, Nov 4, 2009 at 2:55 PM, David Warde-Farley d...@cs.toronto.edu wrote: Hi all (mostly David C. since he probably knows all this horrible stuff), I noticed on my new laptop (with an Atom N280 in it) that when I run numpy.test() about the 34th test would loop, seemingly forever.

Re: [Numpy-discussion] 1.4.0: Setting a firm release date for 1st december.

2009-11-04 Thread Ralf Gommers
On Mon, Nov 2, 2009 at 9:29 AM, David Cournapeau courn...@gmail.com wrote: Hi, I think it is about time to release 1.4.0. Instead of proposing a release date, I am setting a firm date for 1st December, and 16th november to freeze the trunk. If someone wants a different date, you have to

Re: [Numpy-discussion] 1.4.0: Setting a firm release date for 1st december.

2009-11-04 Thread Jarrod Millman
On Wed, Nov 4, 2009 at 1:37 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: It would be good if we could also have one more merge of the work in the doc editor (close to 300 new/changed docstrings now). I can have it all reviewed by the 13th. That would be great. Thanks for taking care of

Re: [Numpy-discussion] (apparent) infinite loop in LAPACK/ATLAS

2009-11-04 Thread David Warde-Farley
Hi David, On 4-Nov-09, at 4:23 AM, David Cournapeau wrote: Did you compile them without any optimized as suggested in the makefiles ? NOOPT should not contain -O option Yup, it contained -O0 -fPIC (-O0 I think is in fact more strict than having no -O option?). Have you seen this problem

Re: [Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit

2009-11-04 Thread George Nurser
2009/11/3 Robin robi...@gmail.com: On Tue, Nov 3, 2009 at 6:14 PM, Robin robi...@gmail.com wrote: After some more pootling about I figured out a lot of the performance loss comes from using 32 bit integers by default when compiles 64 bit. I asked this question on stackoverflow:

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a = numpy.eye(10) cPickle.dump(a,open('from32bitxp.pkl','w')) import

Re: [Numpy-discussion] f2py-users list not working

2009-11-04 Thread George Nurser
Fortran can accept preprocessor directives, but f2py cannot. You first need to preprocess a .F (or .F90) file to create a .f (or .f90) file which you then pass to f2py The way I preprocess the .F file is to have statements like int int*INTSIZE :: i,j,k So preprocess file.F e.g. in gfortran with

[Numpy-discussion] arrays comparison issue

2009-11-04 Thread Jean-Luc Menut
Hello all, If if define 2 variables a and b by doing the following : on [5]: a Out[5]: array([ 1.7]) In [6]: b=array([0.8])+array([0.9]) In [7]: b Out[7]: array([ 1.7]) if I test the equality of a and b, instead to obatin True, I have : In [8]: a==b Out[8]: array([False], dtype=bool) I

Re: [Numpy-discussion] arrays comparison issue

2009-11-04 Thread Lev Givon
Received from Jean-Luc Menut on Wed, Nov 04, 2009 at 09:52:15AM EST: Hello all, If if define 2 variables a and b by doing the following : on [5]: a Out[5]: array([ 1.7]) In [6]: b=array([0.8])+array([0.9]) In [7]: b Out[7]: array([ 1.7]) if I test the equality of a and b,

Re: [Numpy-discussion] arrays comparison issue

2009-11-04 Thread David Cournapeau
On Wed, Nov 4, 2009 at 11:52 PM, Jean-Luc Menut jeanluc.me...@free.fr wrote: Hello all, If if define 2 variables a and b by doing the following : on [5]: a Out[5]: array([ 1.7]) In [6]: b=array([0.8])+array([0.9]) In [7]: b Out[7]: array([ 1.7]) if I test the equality of a and b,

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Charles R Harris
On Wed, Nov 4, 2009 at 7:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a =

Re: [Numpy-discussion] f2py-users list not working

2009-11-04 Thread Robin
On Wed, Nov 4, 2009 at 2:38 PM, George Nurser gnur...@googlemail.com wrote: Fortran can accept preprocessor directives, but f2py cannot. You first need to preprocess a .F (or .F90) file to create a .f (or .f90) file which you then pass to f2py The way I preprocess the .F file is to have

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Thanks for your reply. No. I just tried it with the latest Windows XP 32-bit version Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.3.0' Same result on the

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 38, Issue 11

2009-11-04 Thread Rick White
The difference between IDL and numpy is that IDL uses single precision floats by default while numpy uses doubles. If you try it with doubles in IDL, you will see that it also returns false. As David Cournapeau said, you should not expect different floating point arithmetic operations to

Re: [Numpy-discussion] Automatic string length in recarray

2009-11-04 Thread Thomas Robitaille
Pierre GM-2 wrote: As a workwaround, perhaps you could use np.object instead of np.str while defining your array. You can then get the maximum string length by looping, as David suggested, and then use .astype to transform your array... I tried this:

Re: [Numpy-discussion] arrays comparison issue

2009-11-04 Thread Jean-Luc Menut
thanks to everybody ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread Michael Droettboom
I'm getting the following from r7603 on Solaris Sparc -- somehow related to not having a long double version of next after available. I realise not everyone has access to (or is dependent on) this platform, so I'm willing to help in whatever way I can, I'm just not sure I understand the

Re: [Numpy-discussion] Automatic string length in recarray

2009-11-04 Thread Dan Yamins
On Tue, Nov 3, 2009 at 11:43 AM, David Warde-Farley d...@cs.toronto.eduwrote: On 2-Nov-09, at 11:35 PM, Thomas Robitaille wrote: But if I want to specify the data types: np.rec.fromrecords([(1,'hello'),(2,'world')],dtype=[('a',np.int8), ('b',np.str)]) the string field is set to a

Re: [Numpy-discussion] using FortranFile to read data from a binary Fortran file

2009-11-04 Thread Neil Martinsen-Burrell
On 2009-11-03 20:18 , Brennan Williams wrote: ok I took a closer look at FortranFile and I'm now doing the following. Note that the first line in the file I'm reading has two double precision reals/floats followed by 8 32 bit integers. f=FortranFile(fullfilename,endian='') if

Re: [Numpy-discussion] f2py-users list not working

2009-11-04 Thread George Nurser
2009/11/4 Robin robi...@gmail.com: On Wed, Nov 4, 2009 at 2:38 PM, George Nurser gnur...@googlemail.com wrote: Fortran can accept preprocessor directives, but f2py cannot. You first need to preprocess a .F (or .F90) file to create a .f (or .f90) file which you then pass to f2py The way I

Re: [Numpy-discussion] Automatic string length in recarray

2009-11-04 Thread Pierre GM
On Nov 4, 2009, at 11:35 AM, Thomas Robitaille wrote: Pierre GM-2 wrote: As a workwaround, perhaps you could use np.object instead of np.str while defining your array. You can then get the maximum string length by looping, as David suggested, and then use .astype to transform your

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread David Cournapeau
On Thu, Nov 5, 2009 at 2:15 AM, Michael Droettboom md...@stsci.edu wrote: I'm getting the following from r7603 on Solaris Sparc -- somehow related to not having a long double version of next after available.  I realise not everyone has access to (or is dependent on) this platform, so I'm

Re: [Numpy-discussion] Automatic string length in recarray

2009-11-04 Thread Thomas Robitaille
Pierre GM-2 wrote: Confirmed, it's a bug all right. Would you mind opening a ticket ? I'll try to take care of that in the next few days. Done - http://projects.scipy.org/numpy/ticket/1283 Thanks! Thomas -- View this message in context:

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread Charles R Harris
On Wed, Nov 4, 2009 at 12:11 PM, David Cournapeau courn...@gmail.comwrote: On Thu, Nov 5, 2009 at 2:15 AM, Michael Droettboom md...@stsci.edu wrote: I'm getting the following from r7603 on Solaris Sparc -- somehow related to not having a long double version of next after available. I

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread Charles R Harris
On Wed, Nov 4, 2009 at 12:35 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Nov 4, 2009 at 12:11 PM, David Cournapeau courn...@gmail.comwrote: On Thu, Nov 5, 2009 at 2:15 AM, Michael Droettboom md...@stsci.edu wrote: I'm getting the following from r7603 on Solaris Sparc --

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread Charles R Harris
On Wed, Nov 4, 2009 at 12:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Nov 4, 2009 at 12:35 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Nov 4, 2009 at 12:11 PM, David Cournapeau courn...@gmail.comwrote: On Thu, Nov 5, 2009 at 2:15 AM, Michael

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread Michael Droettboom
David Cournapeau wrote: On Thu, Nov 5, 2009 at 2:15 AM, Michael Droettboom md...@stsci.edu wrote: I'm getting the following from r7603 on Solaris Sparc -- somehow related to not having a long double version of next after available. I realise not everyone has access to (or is dependent on)

[Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread David Warde-Farley
Hi, Suppose I have an array 'd' In [75]: d Out[75]: array(['parrot', 'parrot', 'dog', 'cat', 'parrot', 'dog', 'parrot', 'cat', 'dog', 'dog', 'dog', 'cat', 'cat', 'dog', 'cat', 'parrot', 'cat', 'cat', 'dog', 'parrot', 'parrot', 'parrot', 'cat', 'dog', 'parrot',

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread Alan G Isaac
On 11/4/2009 3:09 PM, David Warde-Farley wrote: I'd like to map every unique element (these could be strings, objects, or already ints) to a unique integer between 0 and len(unique(d)) - 1. mymap = dict((k,v) for v,k in enumerate(set(a))) fwiw, Alan Isaac

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread David Warde-Farley
On 4-Nov-09, at 3:09 PM, David Warde-Farley wrote: But I wonder if there's a better way to do this. Anyone ever run into this problem before? Obviously I find the answer right after I hit send. unique(d, return_inverse=True). Sorry for the noise. David

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread Robert Kern
On Wed, Nov 4, 2009 at 14:21, Alan G Isaac ais...@american.edu wrote: On 11/4/2009 3:09 PM, David Warde-Farley wrote: I'd like to map every unique element (these could be strings, objects, or already ints) to a unique integer between 0 and len(unique(d)) - 1. mymap = dict((k,v) for v,k in

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread David Warde-Farley
Thanks Alan and Robert, I probably should have mentioned that I was interested in obtaining the corresponding integer for each value in the array d, in which case the dictionary bit works but would require a further loop to expand. On 4-Nov-09, at 3:22 PM, Robert Kern wrote: I'd toss in a

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread josef . pktd
On Wed, Nov 4, 2009 at 3:57 PM, David Warde-Farley d...@cs.toronto.edu wrote: Thanks Alan and Robert, I probably should have mentioned that I was interested in obtaining the corresponding integer for each value in the array d, in which case the dictionary bit works but would require a further

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread Neil Crighton
josef.pktd at gmail.com writes: Good point. With the return_inverse solution, is unique() guaranteed to give back the same array of unique values in the same (presumably sorted) order? That is, for two arrays A and B which have elements only drawn from a set S, is all(unique(A) ==

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Bruce Southey
On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a =

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-04 Thread David Cournapeau
On Thu, Nov 5, 2009 at 4:55 AM, Michael Droettboom md...@stsci.edu wrote: David Cournapeau wrote: On Thu, Nov 5, 2009 at 2:15 AM, Michael Droettboom md...@stsci.edu wrote: I'm getting the following from r7603 on Solaris Sparc -- somehow related to not having a long double version of next

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Bruce : The file in question was created as shown in the prior e-mail. Here it is again: cPickle.dump(a,open('from32bitxp.pkl','w')) Thanks! On Wed, Nov 4, 2009 at 3:56 PM, Bruce Southey bsout...@gmail.com wrote: On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
FYI, I uploaded the two files in question to the numpy ticket http://projects.scipy.org/numpy/ticket/1284 Thanks! On Wed, Nov 4, 2009 at 3:56 PM, Bruce Southey bsout...@gmail.com wrote: On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp