Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread josef . pktd
On Thu, Jan 7, 2010 at 11:10 PM, Bruce Southey wrote: > On Thu, Jan 7, 2010 at 3:45 PM, Christopher Barker > wrote: >> Bruce Southey wrote: wrote: >> >>> Using the numpy NaN or similar (noting R's approach to missing values >>> which in turn allows it to have the above functionality) is jus

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Bruce Southey
On Thu, Jan 7, 2010 at 3:45 PM, Christopher Barker wrote: > Bruce Southey wrote: >>> wrote: > >> Using the numpy NaN or similar (noting R's approach to missing values >> which in turn allows it to have the above functionality) is just a >> very bad idea for missing values because you always have

[Numpy-discussion] FIY: a (new ?) practical profiling tool on linux

2010-01-07 Thread David Cournapeau
Hi, I don't know if many people are aware of it, but I have recently discovered perf, a tool available from the kernel sources. It is extremely simple to use, and very useful when looking at numpy/scipy perf issues in compiled code. For example, I can get this kind of results for looking at the nu

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread David Cournapeau
On Fri, Jan 8, 2010 at 11:24 AM, David Warde-Farley wrote: > On 5-Jan-10, at 7:18 PM, Christopher Barker wrote: > >> If distutils/setuptools could identify the python version properly, >> then >>  binary eggs and easy-install could be a solution -- but that's a >> mess, >> too. > > > Long live toy

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread Robert Kern
On 2010-01-07, David Warde-Farley wrote: > On 5-Jan-10, at 7:02 PM, Christopher Barker wrote: >>> I'm not really a fan of packages polluting /usr/local, I'd rather the >>> tree appear /opt/packagename >> >> well, /opt has kind of been co-opted by macports. > > I'd forgotten about that. It's not

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread David Warde-Farley
On 5-Jan-10, at 7:02 PM, Christopher Barker wrote: >> Pretty sure the python.org binaries are 32-bit only. I still think >> it's sensible to prefer the > > waiting the rest of this sentence.. ;-) I had meant to say 'sensible to prefer the Python.org version' though in reality I'm a little miffe

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread David Warde-Farley
On 5-Jan-10, at 7:18 PM, Christopher Barker wrote: > If distutils/setuptools could identify the python version properly, > then > binary eggs and easy-install could be a solution -- but that's a > mess, > too. Long live toydist! :) David ___ NumP

Re: [Numpy-discussion] Numpy & MKL

2010-01-07 Thread David Warde-Farley
On 7-Jan-10, at 8:13 PM, Xue (Sue) Yang wrote: > This is what I had (when I built numpy, I chose gnu compilers > instead of > intel compilers), > numpy.show_config() > lapack_opt_info: >libraries = ['mkl_lapack', 'mkl', 'vml', 'guide', 'pthread'] >library_dirs = ['/usr/physics/intel

Re: [Numpy-discussion] [Pythonmac-SIG] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread David Cournapeau
Christopher Barker wrote: > David Cournapeau wrote: >> On Thu, Jan 7, 2010 at 1:35 AM, Christopher Barker >>> In the past, I think folks' have used the default >>> name provided by bdist_mpkg, and those are not always clear. Something like: >>> >>> >>> numpy1.4-osx10.4-python.org2.6-32bit.dmg >> Th

[Numpy-discussion] fromfile() -- help!

2010-01-07 Thread Christopher Barker
OK, I'm trying to dig into the code and figure out how to get it to stop putting in zeros for missing data with fromfile()/fromstring() text reading. It looks like the culprit is this, in arraytypes.c.src: @fn...@_scan(FILE *fp, @type@ *ip, void *NPY_UNUSED(ignore), PyArray_Descr *NPY_UNUSED(

[Numpy-discussion] Numpy & MKL

2010-01-07 Thread Xue (Sue) Yang
This is what I had (when I built numpy, I chose gnu compilers instead of intel compilers), >>> numpy.show_config() lapack_opt_info: libraries = ['mkl_lapack', 'mkl', 'vml', 'guide', 'pthread'] library_dirs = ['/usr/physics/intel/mkl/lib/32'] define_macros = [('SCIPY_MKL_H', None)]

Re: [Numpy-discussion] Numpy & MKL

2010-01-07 Thread David Warde-Farley
On 7-Jan-10, at 6:58 PM, Xue (Sue) Yang wrote: > Do I need any specifications when I run numpy with intel MKL (MKL9.1)? > numpy developers would be able to answer this question? Are you sure you've compiled against MKL properly? What is printed by numpy.show_config()? David ___

[Numpy-discussion] Numpy & MKL

2010-01-07 Thread Xue (Sue) Yang
I understand that intel mkl uses openMP parallel model. Therefore I set environment variable >>os.environ['OMP_NUM_THREADS'] = '4' With same test example, however, still one cpu is used. Do I need any specifications when I run numpy with intel MKL (MKL9.1)? numpy developers would be able to a

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Christopher Barker
josef.p...@gmail.com wrote: >>> +1 (much preferrable to insert NaN or other user value than raise >>> ValueError in my opinion) >> But raise an error for integer types? >> >> I guess this is still up the air -- no consensus yet. > > raise an exception, I hate the silent cast of nan to integer z

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread josef . pktd
On Thu, Jan 7, 2010 at 4:45 PM, Christopher Barker wrote: > Bruce Southey wrote: >>> wrote: > >> Using the numpy NaN or similar (noting R's approach to missing values >> which in turn allows it to have the above functionality) is just a >> very bad idea for missing values because you always have

Re: [Numpy-discussion] [Pythonmac-SIG] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread neil weisenfeld
On Wed, Jan 6, 2010 at 11:35 AM, Christopher Barker wrote: > > It's worse to have a binary you expect to work fail for you than to not > have one available. IN the past, I think folks' have used the default > name provided by bdist_mpkg, and those are not always clear. Something like: > > > numpy1

Re: [Numpy-discussion] cPickle/unPickle across archs

2010-01-07 Thread Robert Kern
On Thu, Jan 7, 2010 at 15:54, James Mazer wrote: > Hi, > > I've got a some Numeric arrays that were created without > an explicit byte size in the initial declaration and pickled. > Something like this: > >   >>> cPickle.write(array(ones((3,3,)), 'f'), open('foo.pic', 'w')) > > as opposed to: > >

[Numpy-discussion] cPickle/unPickle across archs

2010-01-07 Thread James Mazer
Hi, I've got a some Numeric arrays that were created without an explicit byte size in the initial declaration and pickled. Something like this: >>> cPickle.write(array(ones((3,3,)), 'f'), open('foo.pic', 'w')) as opposed to: >>> cPickle.write(array(ones((3,3,)), Float32), open('foo.pic',

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Christopher Barker
Bruce Southey wrote: >> wrote: > Using the numpy NaN or similar (noting R's approach to missing values > which in turn allows it to have the above functionality) is just a > very bad idea for missing values because you always have to check that > which NaN is a missing value and which was due to

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Travis Oliphant
On Jan 7, 2010, at 2:32 PM, josef.p...@gmail.com wrote: > On Thu, Jan 7, 2010 at 3:08 PM, Christopher Barker > wrote: >> Pauli Virtanen wrote: >>> ma, 2010-01-04 kello 17:05 -0800, Christopher Barker kirjoitti: >>> it also does odd things with spaces embedded in the separator: ",

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Bruce Southey
On Thu, Jan 7, 2010 at 2:32 PM, wrote: > On Thu, Jan 7, 2010 at 3:08 PM, Christopher Barker > wrote: >> Pauli Virtanen wrote: >>> ma, 2010-01-04 kello 17:05 -0800, Christopher Barker kirjoitti: >>> it also does odd things with spaces embedded in the separator: ", $ #" matches all

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread josef . pktd
On Thu, Jan 7, 2010 at 3:08 PM, Christopher Barker wrote: > Pauli Virtanen wrote: >> ma, 2010-01-04 kello 17:05 -0800, Christopher Barker kirjoitti: >> it also does odd things with spaces >>> embedded in the separator: >>> >>> ", $ #" matches all of:  ",$#"   ", $#"  ",$ #" > >> That's a documente

Re: [Numpy-discussion] fromfile() for reading text (one more time!)

2010-01-07 Thread Christopher Barker
Pauli Virtanen wrote: > ma, 2010-01-04 kello 17:05 -0800, Christopher Barker kirjoitti: > it also does odd things with spaces >> embedded in the separator: >> >> ", $ #" matches all of: ",$#" ", $#" ",$ #" > That's a documented feature: Fair enough. OK, I've written a patch that allows newl

Re: [Numpy-discussion] [Pythonmac-SIG] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread Christopher Barker
David Cournapeau wrote: > On Thu, Jan 7, 2010 at 1:35 AM, Christopher Barker >> In the past, I think folks' have used the default >> name provided by bdist_mpkg, and those are not always clear. Something like: >> >> >> numpy1.4-osx10.4-python.org2.6-32bit.dmg > > The 32 bits is redundant - we supp

[Numpy-discussion] Behaviour of vdot(array2d, array1d)

2010-01-07 Thread Nikolas Tezak
Hi, I am new to this list, but I have been using scipy for a couple of months now with great satisfaction. Currently I have a problem: I diagonalize a hermitian complex matrix using the eigh routine from scipy.linalg (this is still a numpy question, see below) This returns the eigenvectors as

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-07 Thread Sturla Molden
> Sturla Molden wrote: >> I would suggest using GotoBLAS instead of ATLAS. > >> http://www.tacc.utexas.edu/tacc-projects/ > > That does look promising -- nay idea what the license is? They don't > make it clear on the site UT TACC Research License (Source Code) The Texas Advanced Computing Ce

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-07 Thread Christopher Barker
Sturla Molden wrote: > I would suggest using GotoBLAS instead of ATLAS. > http://www.tacc.utexas.edu/tacc-projects/ That does look promising -- nay idea what the license is? They don't make it clear on the site (maybe it it is you set up a user account and download, but I'd rather know up front

Re: [Numpy-discussion] Repeated dot products

2010-01-07 Thread denis
On 12/12/2009 22:55, T J wrote: > Hi, > > Suppose I have an array of shape: (n, k, k). In this case, I have n > k-by-k matrices. My goal is to compute the product of a (potentially > large) user-specified selection (with replacement) of these matrices. > For example, > > x = [0,1,2,1,3,3,2,1

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-07 Thread Sturla Molden
> I also tried to Install numpy with intel mkl 9.1 > I still used gfortran for numpy installation as intel mkl 9.1 supports gnu > compiler. I would suggest using GotoBLAS instead of ATLAS. It is easier to build then ATLAS (basically no configuration), and has even better performance than MKL. ht