Re: [Numpy-discussion] Math Library

2010-04-05 Thread Gael Varoquaux
On Mon, Apr 05, 2010 at 05:43:41PM -0500, Travis Oliphant wrote: > I should have some time over the next couple of weeks, and I am very > interested in refactoring the NumPy code to separate out the Python > interface layer from the "library" layer as much as possible. I had > some discussi

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

2010-04-05 Thread T J
On Mon, Apr 5, 2010 at 11:28 AM, Robert Kern wrote: > On Mon, Apr 5, 2010 at 13:26, Erik Tollerud wrote: >> Hmm, unfortunate.  So the best approach then is probably just to tell >> people to install numpy first, then my package? > > Yup. > And really, this isn't that unreasonable. Not only does

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Travis Oliphant
On Apr 5, 2010, at 12:10 PM, David Cournapeau wrote: > On Tue, Apr 6, 2010 at 12:56 AM, Charles R Harris > wrote: >> >>> >> >> Yeah, but there isn't much low level stuff there and I don't want >> to toss a >> lot of real numerical code into it. > > I don't understand: there is already math cod

Re: [Numpy-discussion] Possible bug in indexed masked arrays

2010-04-05 Thread Pierre GM
On Apr 5, 2010, at 2:36 PM, Nathaniel Peterson wrote: > Pierre, Thank you for the wonderful explanation. > I get it! np.alltrue(idx.data == idx2.data) is False. > > PS. Thank you for closing ticket #1447; sorry for the trouble. No problem whatsoever. Thanks for your patience...

Re: [Numpy-discussion] Possible bug in indexed masked arrays

2010-04-05 Thread Nathaniel Peterson
Pierre, Thank you for the wonderful explanation. I get it! np.alltrue(idx.data == idx2.data) is False. PS. Thank you for closing ticket #1447; sorry for the trouble. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mail

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

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 13:26, Erik Tollerud wrote: > Hmm, unfortunate.  So the best approach then is probably just to tell > people to install numpy first, then my package? Yup. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by

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

2010-04-05 Thread Erik Tollerud
Hmm, unfortunate. So the best approach then is probably just to tell people to install numpy first, then my package? On Fri, Apr 2, 2010 at 12:06 PM, Robert Kern wrote: > On Fri, Apr 2, 2010 at 13:03, Erik Tollerud wrote: >> I am writing a setup.py file for a package that will use cython with >

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
On Mon, Apr 5, 2010 at 11:10 AM, David Cournapeau wrote: > On Tue, Apr 6, 2010 at 12:56 AM, Charles R Harris > wrote: > > > >> > > > > Yeah, but there isn't much low level stuff there and I don't want to toss > a > > lot of real numerical code into it. > > I don't understand: there is already mat

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
On Mon, Apr 5, 2010 at 10:56 AM, David Goldsmith wrote: > On Mon, Apr 5, 2010 at 9:50 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> On Mon, Apr 5, 2010 at 10:43 AM, Robert Kern wrote: >> >>> On Mon, Apr 5, 2010 at 11:11, Charles R Harris >>> wrote: >>> > >>> > >>> > On Mon, Apr

Re: [Numpy-discussion] Math Library

2010-04-05 Thread David Cournapeau
On Tue, Apr 6, 2010 at 12:56 AM, Charles R Harris wrote: > >> > > Yeah, but there isn't much low level stuff there and I don't want to toss a > lot of real numerical code into it. I don't understand: there is already math code there, and you cannot be much more low level than what's there (there

Re: [Numpy-discussion] Math Library

2010-04-05 Thread David Goldsmith
On Mon, Apr 5, 2010 at 9:50 AM, Charles R Harris wrote: > On Mon, Apr 5, 2010 at 10:43 AM, Robert Kern wrote: > >> On Mon, Apr 5, 2010 at 11:11, Charles R Harris >> wrote: >> > >> > >> > On Mon, Apr 5, 2010 at 10:00 AM, Robert Kern >> wrote: >> >> >> >> On Mon, Apr 5, 2010 at 10:56, Charles R Ha

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
On Mon, Apr 5, 2010 at 10:43 AM, Robert Kern wrote: > On Mon, Apr 5, 2010 at 11:11, Charles R Harris > wrote: > > > > > > On Mon, Apr 5, 2010 at 10:00 AM, Robert Kern > wrote: > >> > >> On Mon, Apr 5, 2010 at 10:56, Charles R Harris > >> wrote: > >> > > >> > > >> > On Mon, Apr 5, 2010 at 9:43

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 11:11, Charles R Harris wrote: > > > On Mon, Apr 5, 2010 at 10:00 AM, Robert Kern wrote: >> >> On Mon, Apr 5, 2010 at 10:56, Charles R Harris >> wrote: >> > >> > >> > On Mon, Apr 5, 2010 at 9:43 AM, Robert Kern >> > wrote: >> >> >> >> On Mon, Apr 5, 2010 at 10:40, Charles

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

2010-04-05 Thread David Reichert
Hi, Just to let you know, I now fixed the problem using: import sys import numpy sys.modules['numpy.core.defmatrix'] = numpy.matrixlib.defmatrix The key is that the statement "import numpy.core.defmatrix" needs to work for unpickling to succeed, and just renaming things isn't enough. Cheers

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
On Mon, Apr 5, 2010 at 10:00 AM, Robert Kern wrote: > On Mon, Apr 5, 2010 at 10:56, Charles R Harris > wrote: > > > > > > On Mon, Apr 5, 2010 at 9:43 AM, Robert Kern > wrote: > >> > >> On Mon, Apr 5, 2010 at 10:40, Charles R Harris > >> wrote: > >> > Hi All, > >> > > >> > David Cournapeau has

Re: [Numpy-discussion] Extracting values from one array corresponding to argmax elements in another array

2010-04-05 Thread Keith Goodman
On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote: > Hi Folks, >  I have two arrays, A and B, with the same shape.  I want to find the > highest values in A along some axis, then extract the corresponding > values from B.  I can get the highest values in A with A.max(axis=0) and > the indices of the

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 10:56, Charles R Harris wrote: > > > On Mon, Apr 5, 2010 at 9:43 AM, Robert Kern wrote: >> >> On Mon, Apr 5, 2010 at 10:40, Charles R Harris >> wrote: >> > Hi All, >> > >> > David Cournapeau has mentioned that he would like to have a numpy math >> > library that would supp

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
On Mon, Apr 5, 2010 at 9:43 AM, Robert Kern wrote: > On Mon, Apr 5, 2010 at 10:40, Charles R Harris > wrote: > > Hi All, > > > > David Cournapeau has mentioned that he would like to have a numpy math > > library that would supply missing functions and I'm wondering how we > should > > organise t

Re: [Numpy-discussion] Math Library

2010-04-05 Thread David Goldsmith
On Mon, Apr 5, 2010 at 8:40 AM, Charles R Harris wrote: > Hi All, > > David Cournapeau has mentioned that he would like to have a numpy math > library that would supply missing functions and I'm wondering how we should > organise the source code. Should we put a mathlib directory in > numpy/core/s

[Numpy-discussion] Extracting values from one array corresponding to argmax elements in another array

2010-04-05 Thread Ken Basye
Hi Folks, I have two arrays, A and B, with the same shape. I want to find the highest values in A along some axis, then extract the corresponding values from B. I can get the highest values in A with A.max(axis=0) and the indices of these highest values with A.argmax(axis=0). I'm trying to

Re: [Numpy-discussion] Math Library

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 10:40, Charles R Harris wrote: > Hi All, > > David Cournapeau has mentioned that he would like to have a numpy math > library that would supply missing functions and I'm wondering how we should > organise the source code. Should we put a mathlib directory in > numpy/core/src

[Numpy-discussion] Math Library

2010-04-05 Thread Charles R Harris
Hi All, David Cournapeau has mentioned that he would like to have a numpy math library that would supply missing functions and I'm wondering how we should organise the source code. Should we put a mathlib directory in numpy/core/src? Inside that directory would be functions for single/double/exten

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

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 03:08, Nadav Horesh wrote: > Is there a way to use memory mapped files as if they were shared memory? I > made an application in which some (very often non contiguous) parts of a > memmap array are processed by different processors. However I might use > shared memory arr

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

2010-04-05 Thread Nadav Horesh
Is there a way to use memory mapped files as if they were shared memory? I made an application in which some (very often non contiguous) parts of a memmap array are processed by different processors. However I might use shared memory array instead. I wonder, since both types share common propert

Re: [Numpy-discussion] Possible bug in indexed masked arrays

2010-04-05 Thread Pierre GM
On Apr 2, 2010, at 1:08 AM, Nathaniel Peterson wrote: > > Is this behavior of masked arrays intended, or is it a bug? It's not a bug, it's an unfortunate side effect of using boolean masked arrays for indices. Don't. Instead, you should fill the masked arrays with either True or False (dependi