Re: [Numpy-discussion] Annoyance of memap rray withmultiprocessing.Pool.applay_async

2010-04-03 Thread Nadav Horesh
Got it, thank you. But why, nevertheless, the results are correct although the pickling is impossible? Nadav. -Original Message- From: numpy-discussion-boun...@scipy.org on behalf of Robert Kern Sent: Sat 03-Apr-10 23:47 To: Discussion of Numerical Python Subject: Re: [Numpy-discussi

Re: [Numpy-discussion] install problems

2010-04-03 Thread Chris Colbert
On Sat, Apr 3, 2010 at 5:50 PM, Chris Colbert wrote: > On Sat, Apr 3, 2010 at 12:52 PM, Antoine Pairet wrote: >> On Sat, 2010-04-03 at 11:04 -0500, Warren Weckesser wrote: >>> Don't include that last "numpy" in the path.  E.g. >>> >>> export >>> PYTHONPATH=$PYTHONPATH:/home/pcpm/pairet/pythonMod

Re: [Numpy-discussion] install problems

2010-04-03 Thread Chris Colbert
On Sat, Apr 3, 2010 at 12:52 PM, Antoine Pairet wrote: > On Sat, 2010-04-03 at 11:04 -0500, Warren Weckesser wrote: >> Don't include that last "numpy" in the path.  E.g. >> >> export >> PYTHONPATH=$PYTHONPATH:/home/pcpm/pairet/pythonModules/numpy/lib64/python2.4/site-packages >> numpy is installe

Re: [Numpy-discussion] Annoyance of memap rray with multiprocessing.Pool.applay_async

2010-04-03 Thread Robert Kern
On Sat, Apr 3, 2010 at 14:29, Nadav Horesh wrote: > > The following script generate the following error on every loop iteration in > the function average: > > Exception AttributeError: AttributeError("'NoneType' object has no attribute > 'tell'",) in ignored > > where xx is a scalar (the ar

[Numpy-discussion] Getting data from NDarrays to Blitz++ and back again

2010-04-03 Thread Philip Sterne
Hi all, I hope this is the correct place to post my question. I'd like python to interface with c++ code that makes heavy use of Blitz++ arrays. After a day's hacking I appear to have a simple working solution which I am attaching. (It uses Boost.Python and CMake.) However I believe this so

[Numpy-discussion] Annoyance of memap rray with multiprocessing.Pool.applay_async

2010-04-03 Thread Nadav Horesh
The following script generate the following error on every loop iteration in the function average: Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in ignored where xx is a scalar (the array sum). I get this error with numpy1.4 on a linux64 (dual cor

[Numpy-discussion] defmatrix move and unpickling of old data

2010-04-03 Thread David Reichert
Hi, After some work I got an optimized numpy compiled on a machine where I don't have root access, but I had to use numpy 1.4.0 to make it work. Now I have the problem that I cannot seem to unpickle data I had created using numpy 1.3, getting an ImportError about defmatrix not being found. I unde

Re: [Numpy-discussion] Bug in logaddexp2.reduce

2010-04-03 Thread Charles R Harris
On Thu, Apr 1, 2010 at 9:01 PM, Charles R Harris wrote: > > > On Thu, Apr 1, 2010 at 8:16 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Thu, Apr 1, 2010 at 7:59 PM, David Cournapeau >> wrote: >> >>> Anne Archibald wrote: >>> >>> > >>> > First I guess we should check whi

Re: [Numpy-discussion] install problems

2010-04-03 Thread Antoine Pairet
On Sat, 2010-04-03 at 11:04 -0500, Warren Weckesser wrote: > Don't include that last "numpy" in the path. E.g. > > export > PYTHONPATH=$PYTHONPATH:/home/pcpm/pairet/pythonModules/numpy/lib64/python2.4/site-packages > numpy is installed as a "package": a directory that contains the file > __init

Re: [Numpy-discussion] install problems

2010-04-03 Thread Warren Weckesser
Antoine Pairet wrote: > Hi all! > > I am trying to install numpy on a computer which runs Linux and on which > I have no root access. The only possibility is therefore to compile > numpy from source. With the following command, the compilation seems to > work fine: > > python setup.py install --pre

[Numpy-discussion] install problems

2010-04-03 Thread Antoine Pairet
Hi all! I am trying to install numpy on a computer which runs Linux and on which I have no root access. The only possibility is therefore to compile numpy from source. With the following command, the compilation seems to work fine: python setup.py install --prefix=/home/pcpm/pairet/pythonModules/

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-03 Thread Chris Colbert
On Sat, Apr 3, 2010 at 12:17 AM, wrote: > > On Fri, Apr 2, 2010 at 11:45 PM, Chris Colbert wrote: > > > > > > On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud > > wrote: > > you could try something like this (untested): > > if __name__ == '__main__': > >     try: > >         import numpy > >     ex

Re: [Numpy-discussion] TypeError: only integer arrays with one element can be converted to an index

2010-04-03 Thread Warren Weckesser
Are you sure you wanted to make `left` and `right` tuples that contain just one element (which is a numpy array)? In your code, len(a1) will be 1. Maybe I am misinterpreting your code, but I think you want this: left = array([ 107, 594, 1082, 1569, 2057, 2545, 3033, 3520]) right = array([ 133,

[Numpy-discussion] TypeError: only integer arrays with one element can be converted to an index

2010-04-03 Thread yogesh karpate
I am facing the error mentioned in subject line. error is encountered at data_temp=filtered[a:b] TypeError: only integer arrays with one element can be converted to an index what can be error The code snippet is as follows '''left=some array right =some array, both are having same length. filtere