Re: [Numpy-discussion] test code for user defined types in numpy

2011-12-20 Thread Christopher Jordan-Squire
On Tue, Dec 20, 2011 at 9:10 PM, Mark Wiebe wrote: > On Tue, Dec 20, 2011 at 6:24 PM, Geoffrey Irving wrote: >> >> Hello, >> >> As a followup to the prior thread on bugs in user defined types in >> numpy, I converted my rational number class from C++ to C and switched >> to 32 bits to remove the

Re: [Numpy-discussion] test code for user defined types in numpy

2011-12-20 Thread Mark Wiebe
On Tue, Dec 20, 2011 at 6:24 PM, Geoffrey Irving wrote: > Hello, > > As a followup to the prior thread on bugs in user defined types in > numpy, I converted my rational number class from C++ to C and switched > to 32 bits to remove the need for unportable 128 bit numbers. It > should be usable a

Re: [Numpy-discussion] find location of maximum values

2011-12-20 Thread Benjamin Root
On Tuesday, December 20, 2011, questions anon wrote: > ok thanks, a quick try at using it resulted in: > IndexError: index out of bounds > but I may need to do abit more investigating to understand how it works. > thanks The assumption is that these arrays are all the same shape. If not, then ex

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
Sorry about that. I don't think that terminology is commonly used. This is what I mean. Let's say I solve the equations and compute the eigenvalues and eigenvectors for the given two matrices. I call these results "non-normalized". Then they can be normalized. Once they are normalized if I mult

Re: [Numpy-discussion] test code for user defined types in numpy

2011-12-20 Thread Travis Oliphant
This is really excellent. I would like to take a stab at getting this pulled in to the code base --- and fixing the GIL issue --- if someone hasn't beat me to it. Travis -- Travis Oliphant (on a mobile) 512-826-7480 On Dec 20, 2011, at 9:24 PM, Geoffrey Irving wrote: > Hello, > > As a fo

Re: [Numpy-discussion] find location of maximum values

2011-12-20 Thread questions anon
ok thanks, a quick try at using it resulted in: IndexError: index out of bounds but I may need to do abit more investigating to understand how it works. thanks On Wed, Dec 21, 2011 at 2:20 PM, Olivier Delalleau wrote: > I'm sorry I don't have time to look closely at your code and this may not >

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Olivier Delalleau
Ok well I'm sorry, I have no idea what would be the difference between "non-normalized" and "un-normalized". In PCA you may decide to scale your eigenvectors by the inverse of the square root of their corresponding eigenvalue so that your projected data has unit variance, but it doesn't seem to be

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
I think I am interested in the non-normalized eigenvectors not the un-normalized ones. Once the eig function computes the generalized eigenvectors I would like to use them as they are. I would think this would be a common request since the normal-mode frequency response is used in many different f

Re: [Numpy-discussion] find location of maximum values

2011-12-20 Thread Olivier Delalleau
I'm sorry I don't have time to look closely at your code and this may not be helpful, but just in case... I find it suspicious that you *seem* (by quickly glancing at the code) to be taking TIME[max(temperature)] instead of TIME[argmax(temperature)]. -=- Olivier 2011/12/20 questions anon > I ha

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Olivier Delalleau
What I don't get is that "un-normalized" eigenvectors can be pretty much anything. If you care about the specific output of Matlab / Octave, it means you understand the particular "un-normalization" that these programs use. In that case you should be able to recover it from the normalized output fr

[Numpy-discussion] find location of maximum values

2011-12-20 Thread questions anon
I have a netcdf file that contains hourly temperature data for a whole month. I would like to find the maximum temperature within that file and also the corresponding Latitude and Longitude and Time and then plot this. Below is the code I have so far. I think everything is working except for identi

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
I don't think I can do that. I can go to the normalized results but not the other way. On Tue, Dec 20, 2011 at 9:45 PM, Olivier Delalleau wrote: > Hmm, sorry, I don't see any obvious logic that would explain how Octave > obtains this result, although of course there is probably some logic... >

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Olivier Delalleau
Hmm, sorry, I don't see any obvious logic that would explain how Octave obtains this result, although of course there is probably some logic... Anyway, since you seem to know what you want, can't you obtain the same result by doing whatever un-normalizing operation you are after? -=- Olivier 201

Re: [Numpy-discussion] test code for user defined types in numpy

2011-12-20 Thread Charles R Harris
On Tue, Dec 20, 2011 at 7:24 PM, Geoffrey Irving wrote: > Hello, > > As a followup to the prior thread on bugs in user defined types in > numpy, I converted my rational number class from C++ to C and switched > to 32 bits to remove the need for unportable 128 bit numbers. It > should be usable a

[Numpy-discussion] test code for user defined types in numpy

2011-12-20 Thread Geoffrey Irving
Hello, As a followup to the prior thread on bugs in user defined types in numpy, I converted my rational number class from C++ to C and switched to 32 bits to remove the need for unportable 128 bit numbers. It should be usable as a fairly thorough test case for user defined types now. It does ra

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Charles R Harris
On Tue, Dec 20, 2011 at 3:16 PM, Jack Bryan wrote: > Hi, > I have set up PYTHONPATH : > > >>> sys.path > ['', '/mypath/numpy/lib/python2.7/site-packages', '/ > mypath/python272/lib/python27.zip', > '/ mypath/python272/lib/python2.7', '/ > mypath/python272/lib/python2.7/plat-linux2', > '/ mypat

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
I should include the scipy response too I guess. scipy.linalg.eig(STIFM, MASSM) (array([ 3937.15984097+0.j, 3937.15984097+0.j, 3937.15984097+0.j, 3923.07692308+0.j, 3923.07692308+0.j, 7846.15384615+0.j]), array([[ 1., 0., 0., 0., 0., 0.], [ 0., 1., 0., 0., 0., 0.],

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
If I can get the same response as Matlab I would be all set. Octave results >> STIFM STIFM = Diagonal Matrix 102000000 0 10200000 00 1020000 00

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Olivier Delalleau
Hmm... ok ;) (sorry, I can't follow you there) Anyway, what kind of non-normalization are you after? I looked at the doc for Matlab and it just says eigenvectors are not normalized, without additional details... so it looks like it could be anything. -=- Olivier 2011/12/20 Fahreddın Basegmez >

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
I am computing normal-mode frequency response of a mass-spring system. The algorithm I am using requires it. On Tue, Dec 20, 2011 at 8:10 PM, Olivier Delalleau wrote: > I'm probably missing something, but... Why would you want non-normalized > eigenvectors? > > -=- Olivier > > > 2011/12/20 Fahr

Re: [Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Olivier Delalleau
I'm probably missing something, but... Why would you want non-normalized eigenvectors? -=- Olivier 2011/12/20 Fahreddın Basegmez > Howdy, > > Is it possible to get non-normalized eigenvectors from scipy.linalg.eig(a, > b)? Preferably just by using numpy. > > BTW, Matlab/Octave provides this w

[Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?

2011-12-20 Thread Fahreddın Basegmez
Howdy, Is it possible to get non-normalized eigenvectors from scipy.linalg.eig(a, b)? Preferably just by using numpy. BTW, Matlab/Octave provides this with its eig(a, b) function but I would like to use numpy for obvious reasons. Regards, Fahri ___

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Jack Bryan
Hi, I have set up PYTHONPATH : >>> sys.path['', '/mypath/numpy/lib/python2.7/site-packages', '/ mypath/python272/lib/python27.zip', '/ mypath/python272/lib/python2.7', '/ mypath/python272/lib/python2.7/plat-linux2', '/ mypath /python272/lib/python2.7/lib-tk', '/ mypath/python272/lib/python2.7/lib-

Re: [Numpy-discussion] trouble building numpy 1.6.1 on Scientific Linux 5

2011-12-20 Thread Ralf Gommers
On Tue, Dec 20, 2011 at 10:52 PM, Russell E. Owen wrote: > In article , > "Russell E. Owen" wrote: > > > In article > > , > > Ralf Gommers wrote: > > > > > On Fri, Dec 9, 2011 at 8:02 PM, Russell E. Owen wrote: > > > > > > > I'm trying to build numpy 1.6.1 on Scientific Linux 5 but the unit

Re: [Numpy-discussion] trouble building numpy 1.6.1 on Scientific Linux 5

2011-12-20 Thread Russell E. Owen
In article , "Russell E. Owen" wrote: > In article > , > Ralf Gommers wrote: > > > On Fri, Dec 9, 2011 at 8:02 PM, Russell E. Owen wrote: > > > > > I'm trying to build numpy 1.6.1 on Scientific Linux 5 but the unit tests > > > claim the wrong version of fortran was used. I thought I knew h

Re: [Numpy-discussion] trouble building numpy 1.6.1 on Scientific Linux 5

2011-12-20 Thread Russell E. Owen
In article , Olivier Delalleau wrote: > 2011/12/12 Russell E. Owen > > > In article > > , > > Ralf Gommers wrote: > > > > > On Fri, Dec 9, 2011 at 8:02 PM, Russell E. Owen wrote: > > > > > > > I'm trying to build numpy 1.6.1 on Scientific Linux 5 but the unit > > tests > > > > claim the wr

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-20 Thread Ralf Gommers
On Tue, Dec 20, 2011 at 3:18 PM, Charles R Harris wrote: > Hi Ralf, > > On Mon, Dec 5, 2011 at 12:43 PM, Ralf Gommers > wrote: > >> Hi all, >> >> It's been a little over 6 months since the release of 1.6.0 and the NA >> debate has quieted down, so I'd like to ask your opinion on the timing of >>

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Robert Kern
On Tue, Dec 20, 2011 at 20:23, Derek Homeier wrote: > On 20.12.2011, at 9:01PM, Jack Bryan wrote: > >> customize Gnu95FCompiler using config >> C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 >> -Wall -Wstrict-prototypes -fPIC >> >> compile options: '-Inumpy/core/src/

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Derek Homeier
On 20.12.2011, at 9:01PM, Jack Bryan wrote: > customize Gnu95FCompiler using config > C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 > -Wall -Wstrict-prototypes -fPIC > > compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core > -Inumpy/core/src/np

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Jack Bryan
Hi,I run : python setup.py build and got: building library "npymath" sourcescustomize GnuFCompilerCould not locate executable g77Could not locate executable f77customize IntelFCompilerCould not locate executable ifortCould not locate executable ifccustomize LaheyFCompilerCould not locate execu

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Derek Homeier
Hi Jack, > In order to install scipy, I am trying to install numpy 1.6.1. on GNU/linux > redhat 2.6.18. > > But, I got error about fortran compiler. > > I have gfortran. I do not have f77/f90/g77/g90. > that's good! > I run : > python setup.py build --fcompiler=gfortran > > It woks well

[Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Jack Bryan
Hi, In order to install scipy, I am trying to install numpy 1.6.1. on GNU/linux redhat 2.6.18. But, I got error about fortran compiler. I have gfortran. I do not have f77/f90/g77/g90. I run :python setup.py build --fcompiler=gfortran It woks well and tells me that customize Gnu95FCompilerFo

Re: [Numpy-discussion] import_array weird behavior

2011-12-20 Thread Robert Kern
On Tue, Dec 20, 2011 at 10:31, Marc POINOT wrote: > > Hi all, > > I've just changed to cython and old numpy module with a raw C API. > The C module init is removed, and I've put the import_array in the > 'pure-cython' > part of the module init. Usual tutorial examples have these lines: > > import

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-20 Thread Charles R Harris
Hi Ralf, On Mon, Dec 5, 2011 at 12:43 PM, Ralf Gommers wrote: > Hi all, > > It's been a little over 6 months since the release of 1.6.0 and the NA > debate has quieted down, so I'd like to ask your opinion on the timing of > 1.7.0. It looks to me like we have a healthy amount of bug fixes and sma

[Numpy-discussion] import_array weird behavior

2011-12-20 Thread Marc POINOT
Hi all, I've just changed to cython and old numpy module with a raw C API. The C module init is removed, and I've put the import_array in the 'pure-cython' part of the module init. Usual tutorial examples have these lines: import numpy as NPY cimport numpy as NPY NPY.import_array() But this f