[Numpy-discussion] setting items in a matrix

2007-12-20 Thread [EMAIL PROTECTED]
hi i am a beginner with numpy and python,so pardon me if this doubt seems silly i want to create a matrix with say 3 rows and 5 columns..and then set the values of each item in it .for this i did something like below myarray=zeros((3,5)) #then set the items for row in range(3): for col in rang

[Numpy-discussion] setting items in a matrix

2007-12-20 Thread [EMAIL PROTECTED]
hi i am a beginner with numpy and python,so pardon me if this doubt seems silly i want to create a matrix with say 3 rows and 5 columns..and then set the values of each item in it .for this i did something like below myarray=zeros((3,5)) #then set the items for row in range(3): for col in rang

Re: [Numpy-discussion] Towards using scons in numpy: 1st step

2007-12-20 Thread David Cournapeau
On Dec 20, 2007 10:29 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > David Cournapeau wrote: > > Hi, > > > > as discussed with some other numpy developers, in particular Travis, I > > started to prepare my work related to scons for step-by-step merging > > into the trunk. The first step is don

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-20 Thread Pierre GM
> > * cumsum(cumprod) works as if the _data array was filled with 0 (1). The > > mask is preserved, but not updated. (the output of numpy.core.ma has > > nomask). > > I don't understand what you mean here.So, the mask effectively > removes those elements from the sum(product) computation? What

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-20 Thread Travis E. Oliphant
Pierre GM wrote: > All, > > >> I'd like to move forward with it sooner (for 1.0.5) if the API changes >> are not drastic. Although ideally 0 API changes would be desireable, >> I'm not sure if that is feasible. Are put and putmask the only changes >> in the API. What are the rest of them? >>

Re: [Numpy-discussion] Loading a > GB file into array

2007-12-20 Thread Martin Spacek
>> By the way, I installed 64-bit linux (ubuntu 7.10) on the same machine, >> and now numpy.memmap works like a charm. Slicing around a 15 GB file is fun! >> > Thanks for the feedback ! > Did you get the kind of speed you need and/or the speed you were hoping for ? Nope. Like I wrote earlier, it s

[Numpy-discussion] new P3 binaries for NumPy 1.0.4 and SciPy 0.6.0

2007-12-20 Thread Jarrod Millman
Hey, If you are having problems with NumPy and SciPy on Pentium III machines running Windows, please try the newly released binaries: numpy-1.0.4.win32-p3-py2.3.exe numpy-1.0.4.win32-p3-py2.4.exe numpy-1.0.4.win32-p3-py2.5.exe numpy-1.0.4.win32-p3-py2.5.msi scipy-0.6.0.win32-p3-py2.3.exe scipy-0

Re: [Numpy-discussion] where construct

2007-12-20 Thread Hans Meine
On Donnerstag 20 Dezember 2007, Christopher Barker wrote: > > In [9]: print where( (logical_or(a<1, b<3)), b,c) > > [4 2 2 1] > > (Think of the Zen.) > > I'm not sure the Zen answers this one for us. As you have guessed correctly, I was thinking of "explicit is better than implicit". > It's real

Re: [Numpy-discussion] Loading a > GB file into array

2007-12-20 Thread Sebastian Haase
On Dec 20, 2007 3:22 AM, Martin Spacek <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > b) To my knowledge, any OS Linux, Windows an OSX can max. allocate > > about 1GB of data - assuming you have a 32 bit machine. > > The actual numbers I measured varied from about 700MB to maybe 1.3GB. >

Re: [Numpy-discussion] Loading a > GB file into array

2007-12-20 Thread Sebastian Haase
On Dec 20, 2007 3:22 AM, Martin Spacek <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > b) To my knowledge, any OS Linux, Windows an OSX can max. allocate > > about 1GB of data - assuming you have a 32 bit machine. > > The actual numbers I measured varied from about 700MB to maybe 1.3GB. >

Re: [Numpy-discussion] segfault with atlas3-sse2, works with atlas3-sse

2007-12-20 Thread Pauli Virtanen
to, 2007-12-20 kello 17:32 +0100, Ondrej Certik kirjoitti: > > > when compiled on Debian, numpy segfaults when used with ATLAS sse2, > > > but works when used against ATLAS sse. More information here: > > > > What is the machine on which you are getting the segfault? Is it > > I don't know which

Re: [Numpy-discussion] SciPy Sprint results

2007-12-20 Thread Christopher Barker
Travis E. Oliphant wrote: > Currently, this > board consists of (alphabetically) > > Eric Jones > Robert Kern > Jarrod Millman > Travis Oliphant Excellent team -- thanks guys! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6

Re: [Numpy-discussion] where construct

2007-12-20 Thread Christopher Barker
Hans Meine wrote: >> where( (a<1 or b<3), b,c) > > Now + and | have been proposed to you, but it looks to me as if the "correct > way" would be logical_or. All solutions give the same result, but logical_or > better expresses what you're trying to do: > > In [9]: print where( (logical_or(a<1,

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-20 Thread Pierre GM
All, > I'd like to move forward with it sooner (for 1.0.5) if the API changes > are not drastic. Although ideally 0 API changes would be desireable, > I'm not sure if that is feasible. Are put and putmask the only changes > in the API. What are the rest of them? * put, putmask, take should be

[Numpy-discussion] Numpy or Boost problem

2007-12-20 Thread Bruce Sherwood
I'm not sure whether this is a Numpy problem or a Boost problem, so I'm posting to both communities. In old Numeric, type(sqrt(5.5)) was float, but in numpy, type(sqrt(5.5)) is numpy.float64. This leads to a big performance hit in calculations in a beta version of VPython, using the VPython 3D

[Numpy-discussion] Indexing into a matrix

2007-12-20 Thread Keith Goodman
>> x = M.rand(3,1) < 3x1 >> x[M.isfinite(x)] matrix([[ 0.36541551, 0.6305087 , 0.66054899]]) <-- Should this be 3x1? My workaround is awkward: >> x[M.where(M.isfinite(x).A)[0]] matrix([[ 0.36541551], [ 0.6305087 ], [ 0.66054899]]) _

Re: [Numpy-discussion] segfault with atlas3-sse2, works with atlas3-sse

2007-12-20 Thread Ondrej Certik
> > when compiled on Debian, numpy segfaults when used with ATLAS sse2, > > but works when used against ATLAS sse. More information here: > > What is the machine on which you are getting the segfault? Is it I don't know which machine the reporter of this bug in Debian uses, but I use Intel Core D

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-20 Thread Travis E. Oliphant
Stefan van der Walt wrote: > Hi Travis, > > During the sprint I also merged Pierre's MaskedArray code into the > maskedarray branch. That is nearly done, with only a few unit tests > still failing -- ones brought over from the old numpy.ma. > > This is mainly due to some changes in the API, for ex

Re: [Numpy-discussion] where construct

2007-12-20 Thread Hans Meine
Am Sonntag, 16. Dezember 2007 20:10:41 schrieb Ross Harder: > What's the correct way to do something like this? > > a=array( (0,1,1,0) ) > b=array( (4,3,2,1) ) > c=array( (1,2,3,4) ) > > where( (a<1 or b<3), b,c) Now + and | have been proposed to you, but it looks to me as if the "correct way" wo