Re: [Numpy-discussion] build_clib error during Enable 3_2_1 installation

2009-08-14 Thread Gökhan Sever
Fixed this using the suggestion from Robert Kern Nabble - Numpy-discussion - Is this a bug in numpy.distutils ?

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread David Goldsmith
Excellent, thanks! DG --- On Fri, 8/14/09, Robert Kern wrote: > From: Robert Kern > Subject: Re: [Numpy-discussion] passing "import numpy as np" as python > command arg in 'doze > To: "Discussion of Numerical Python" > Date: Friday, August 14, 2009, 3:23 PM > On Fri, Aug 14, 2009 at 17:18, D

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread Robert Kern
On Fri, Aug 14, 2009 at 17:18, David Goldsmith wrote: > Thanks, Skipper & Robert; perhaps I'm misunderstanding what should happen, > but this doesn't appear to work in Windoze: > > Begin Terminal output: > > C:\Python26>python -c "import numpy as np" > > C:\Python26> > > End Terminal output. > > I

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread Skipper Seabold
On Fri, Aug 14, 2009 at 6:18 PM, David Goldsmith wrote: > Thanks, Skipper & Robert; perhaps I'm misunderstanding what should happen, > but this doesn't appear to work in Windoze: > > Begin Terminal output: > > C:\Python26>python -c "import numpy as np" > > C:\Python26> > > End Terminal output. >

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread David Goldsmith
Thanks, Skipper & Robert; perhaps I'm misunderstanding what should happen, but this doesn't appear to work in Windoze: Begin Terminal output: C:\Python26>python -c "import numpy as np" C:\Python26> End Terminal output. In other words, no error is returned, but python doesn't "stay running".

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread David Goldsmith
Thanks! DG --- On Fri, 8/14/09, Robert Kern wrote: > From: Robert Kern > Subject: Re: [Numpy-discussion] passing "import numpy as np" as python > command arg in 'doze > To: "Discussion of Numerical Python" > Date: Friday, August 14, 2009, 2:20 PM > On Fri, Aug 14, 2009 at 16:16, David > Gold

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread Skipper Seabold
On Fri, Aug 14, 2009 at 5:16 PM, David Goldsmith wrote: > Hi!  Please remind: running python in the Windows Terminal (DOS command > prompt), how does one pass the command "import numpy as np"?  I tried 'python > "import numpy as np"', to no avail. > Is this what you want? In a linux terminal p

Re: [Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread Robert Kern
On Fri, Aug 14, 2009 at 16:16, David Goldsmith wrote: > Hi!  Please remind: running python in the Windows Terminal (DOS command > prompt), how does one pass the command "import numpy as np"?  I tried 'python > "import numpy as np"', to no avail. $ python -h usage: /Library/Frameworks/Python.fra

[Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

2009-08-14 Thread David Goldsmith
Hi! Please remind: running python in the Windows Terminal (DOS command prompt), how does one pass the command "import numpy as np"? I tried 'python "import numpy as np"', to no avail. DG ___ NumPy-Discussion mailing list NumPy-Discussion@sci

Re: [Numpy-discussion] build_clib error during Enable 3_2_1 installation

2009-08-14 Thread Gökhan Sever
Hello, I fix the scipy installation issue. I usually checkout the whole ETS trunk (ets co ETS) and do a "ets develop". After fullfilling the requirements it was always successfully building the whole code-stack (well at least always in Fedora 10). In this case it fails on Enable compilation step.

Re: [Numpy-discussion] Cython BOF

2009-08-14 Thread David Warde-Farley
+1. The topics (especially native SIMD) sound fantastic so far. David On 14-Aug-09, at 9:04 AM, Dag Sverre Seljebotn wrote: > There's been some discussion earlier about how starting to write > bigger > parts of the NumPy/SciPy codebase in Cython could potentially lower > the > barrier of ent

Re: [Numpy-discussion] masked index surprise

2009-08-14 Thread Keith Goodman
On Fri, Aug 14, 2009 at 12:24 PM, Robert Kern wrote: > On Fri, Aug 14, 2009 at 14:20, Keith Goodman wrote: >> On Fri, Aug 14, 2009 at 11:52 AM, Robert Kern wrote: >>> On Fri, Aug 14, 2009 at 13:05, John Hunter wrote: I just tracked down a subtle bug in my code, which is equivalent to

Re: [Numpy-discussion] masked index surprise

2009-08-14 Thread Robert Kern
On Fri, Aug 14, 2009 at 14:20, Keith Goodman wrote: > On Fri, Aug 14, 2009 at 11:52 AM, Robert Kern wrote: >> On Fri, Aug 14, 2009 at 13:05, John Hunter wrote: >>> I just tracked down a subtle bug in my code, which is equivalent to >>> >>> >>> In [64]: x, y = np.random.rand(2, n) >>> >>> In [65]: z

Re: [Numpy-discussion] masked index surprise

2009-08-14 Thread Keith Goodman
On Fri, Aug 14, 2009 at 11:52 AM, Robert Kern wrote: > On Fri, Aug 14, 2009 at 13:05, John Hunter wrote: >> I just tracked down a subtle bug in my code, which is equivalent to >> >> >> In [64]: x, y = np.random.rand(2, n) >> >> In [65]: z = np.zeros_like(x) >> >> In [66]: mask = x>0.5 >> >> In [67]

Re: [Numpy-discussion] masked index surprise

2009-08-14 Thread Robert Kern
On Fri, Aug 14, 2009 at 13:05, John Hunter wrote: > I just tracked down a subtle bug in my code, which is equivalent to > > > In [64]: x, y = np.random.rand(2, n) > > In [65]: z = np.zeros_like(x) > > In [66]: mask = x>0.5 > > In [67]: z[mask] = x/y > > > > I meant to write > >  z[mask] = x[mask]/y

[Numpy-discussion] masked index surprise

2009-08-14 Thread John Hunter
I just tracked down a subtle bug in my code, which is equivalent to In [64]: x, y = np.random.rand(2, n) In [65]: z = np.zeros_like(x) In [66]: mask = x>0.5 In [67]: z[mask] = x/y I meant to write z[mask] = x[mask]/y[mask] so I can fix my code, but why is line 67 allowed In [68]: z[m

Re: [Numpy-discussion] ndarray subclass causes memory leak

2009-08-14 Thread Jeremy Mayes
I've narrowed this down to a change between 1.0.4 and 1.1.0. Valgrind (of v1.3.0) shows the following result. The change was in setArrayFromSequence where PyArray_EnsureArray gets invoked in v1.1.0 where it did not in v1.0.4. ==10132== 4,474,768 (3,197,200 direct, 1,277,568 indirect) bytes in 39

Re: [Numpy-discussion] Cython BOF

2009-08-14 Thread Kurt Smith
On Fri, Aug 14, 2009 at 8:04 AM, Dag Sverre Seljebotn wrote: > There's been some discussion earlier about how starting to write bigger > parts of the NumPy/SciPy codebase in Cython could potentially lower the > barrier of entry. > > Some topics: >  * Move towards PEP3118 as the primary scientific "

Re: [Numpy-discussion] Cython BOF

2009-08-14 Thread Darren Dale
On Fri, Aug 14, 2009 at 9:04 AM, Dag Sverre Seljebotn wrote: > There's been some discussion earlier about how starting to write bigger > parts of the NumPy/SciPy codebase in Cython could potentially lower the > barrier of entry. > > Some topics: >  * Move towards PEP3118 as the primary scientific "

[Numpy-discussion] Cython BOF

2009-08-14 Thread Dag Sverre Seljebotn
There's been some discussion earlier about how starting to write bigger parts of the NumPy/SciPy codebase in Cython could potentially lower the barrier of entry. Some topics: * Move towards PEP3118 as the primary scientific "data container" rather than ndarray? * Cython templates? * Nativ

Re: [Numpy-discussion] finding range of values below threshold in sorted array

2009-08-14 Thread Emmanuelle Gouillart
Hi, ind = np.searchsorted(A, b) values = A[:ind] Cheers, Emmanuelle On Fri, Aug 14, 2009 at 02:27:23PM +0200, Mark Bakker wrote: >Hello List, >I am trying to find a quick way to do the following: >I have a *sorted* array of real numbers, say array A, sorted in ascending >order

[Numpy-discussion] finding range of values below threshold in sorted array

2009-08-14 Thread Mark Bakker
Hello List, I am trying to find a quick way to do the following: I have a *sorted* array of real numbers, say array A, sorted in ascending order (but easy to store descending if that would help) I want to find all numbers below a certain value, say b Sure, I can do A < b and I will get back a

[Numpy-discussion] ndarray subclass causes memory leak

2009-08-14 Thread Jeremy Mayes
This simple example causes a massive leak in v1.3.0 which didn't exist in v1.0.1. What am I doing wrong? If I replace arr = [Array((2,2)), Array((2,2))] with arr = [numpy.ndarray((2,2,)), numpy.ndarray((2,2))] then I don't have the leak import numpy import gc class Array(numpy.ndarray): d