Re: [Numpy-discussion] [SciPy-Dev] Good-bye, sort of (John Hunter)

2010-08-17 Thread Martin Raspaud
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Goldsmith skrev: > > > Ahh, cell arrays, they bring back memories. Makes you pine for a > dictionary, no? > > JDH > > > Not to mention writeline, readline, string concatenation using +, > English wording of loops, list comprehen

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Christoph Gohlke
On 8/17/2010 9:56 PM, Charles R Harris wrote: > > > On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke > wrote: > > > > On 8/17/2010 1:02 PM, Charles R Harris wrote: > > > > > > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread David
On 08/18/2010 01:56 PM, Charles R Harris wrote: > > > On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke > wrote: > > > > On 8/17/2010 1:02 PM, Charles R Harris wrote: > > > > > > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke > mailto:cgoh...@uci.e

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Charles R Harris
On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke wrote: > > > On 8/17/2010 1:02 PM, Charles R Harris wrote: > > > > > > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke > > wrote: > > > > > > > > On 8/17/2010 8:23 AM, Ralf Gommers wrote: > > > > I am pleased

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Charles R Harris
On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke wrote: > > > On 8/17/2010 1:02 PM, Charles R Harris wrote: > > > > > > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke > > wrote: > > > > > > > > On 8/17/2010 8:23 AM, Ralf Gommers wrote: > > > > I am pleased

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Christoph Gohlke
On 8/17/2010 1:02 PM, Charles R Harris wrote: > > > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke > wrote: > > > > On 8/17/2010 8:23 AM, Ralf Gommers wrote: > > I am pleased to announce the availability of the second beta of > NumPy > 1.5.0

Re: [Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Scott MacDonald
Thanks Warren, that does solve the problem. I am still confused however by this: In [42]: c = StringIO("5399354557888517120") In [43]: np.loadtxt(c, dtype=np.uint64) Out[43]: array(5399354557888517120L, dtype=uint64) Does the above seem contradictory to you? Thanks, Scott On Tue, Aug 17, 2010

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Bruce Southey
On Tue, Aug 17, 2010 at 7:07 PM, Ralf Gommers wrote: > > > On Wed, Aug 18, 2010 at 12:31 AM, Bruce Southey wrote: >> >> On Tue, Aug 17, 2010 at 10:23 AM, Ralf Gommers >> wrote: >> > I am pleased to announce the availability of the second beta of NumPy >> > 1.5.0. >> > This will be the first NumP

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread David Cournapeau
On Wed, Aug 18, 2010 at 12:23 AM, Ralf Gommers wrote: > I am pleased to announce the availability of the second beta of NumPy 1.5.0. > This will be the first NumPy release to include support for Python 3, as > well as for Python 2.7. > > Please try this beta and report any problems on the NumPy ma

Re: [Numpy-discussion] numpy.concatenate slower than slice copying

2010-08-17 Thread Francesc Alted
Hey Zbyszek, 2010/8/17, Zbyszek Szmek : > Hi, > this is a problem which came up when trying to replace a hand-written > array concatenation with a call to numpy.vstack: > for some array sizes, > >numpy.vstack(data) > > runs > 20% longer than a loop like > >alldata = numpy.empty((tlen, dim)

Re: [Numpy-discussion] Problems building NumPy with GotoBLAS

2010-08-17 Thread David
On 08/18/2010 07:39 AM, ashf...@whisperpc.com wrote: > Eloi, > >> please below a script that will build numpy using a relevant site.cfg for >> your >> configuration (you need to update GOTODIR and LAPACKDIR and PYTHONDIR): > >> #copy site.cfg >> cp ./site.cfg PYTHONDIR/lib/python2.6/site-packages/

Re: [Numpy-discussion] Problems building NumPy with GotoBLAS

2010-08-17 Thread David
On 08/17/2010 08:43 PM, Eloi Gaudry wrote: > Peter, > > please below a script that will build numpy using a relevant site.cfg for > your configuration (you need to update GOTODIR and LAPACKDIR and PYTHONDIR): > > #!/bin/sh > > #BLAS/LAPACK configuration file > echo "[blas]"> ./site.cfg > echo "l

Re: [Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Warren Weckesser
Scott MacDonald wrote: > Hi, > > I have a text file called 'blah' that contains only the following line: > > 5399354557888517312,5399354557888517312 > > I want to load these into a numpy array as unit64's. The following > script demonstrates my problem: > > import numpy as np > > with open('blah'

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Ralf Gommers
On Wed, Aug 18, 2010 at 3:08 AM, Charles R Harris wrote: > > > On Tue, Aug 17, 2010 at 11:27 AM, Michael Droettboom wrote: > >> I'm getting one unit test error on SunOS 5.8 UltraSPARC 5, with Sun >> WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20: >> >>

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Ralf Gommers
On Wed, Aug 18, 2010 at 12:31 AM, Bruce Southey wrote: > On Tue, Aug 17, 2010 at 10:23 AM, Ralf Gommers > wrote: > > I am pleased to announce the availability of the second beta of NumPy > 1.5.0. > > This will be the first NumPy release to include support for Python 3, as > > well as for Python

[Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Scott MacDonald
Hi, I have a text file called 'blah' that contains only the following line: 5399354557888517312,5399354557888517312 I want to load these into a numpy array as unit64's. The following script demonstrates my problem: import numpy as np with open('blah', 'r') as f: x = np.loadtxt(f, delimite

Re: [Numpy-discussion] Problems building NumPy with GotoBLAS

2010-08-17 Thread ashford
Eloi, > please below a script that will build numpy using a relevant site.cfg for your > configuration (you need to update GOTODIR and LAPACKDIR and PYTHONDIR): > #copy site.cfg > cp ./site.cfg PYTHONDIR/lib/python2.6/site-packages/numpy/distutils/. I believe this needs a $ prior to PYTHONDIR.

Re: [Numpy-discussion] numpy.concatenate slower than slice copying

2010-08-17 Thread Chris Colbert
Yes, concatenate is doing other work under the covers. In short, in supports concatenating a list of arbitrary python sequences into an array and does checking on each element of the tuple to ensure it is valid to concatenate. On Tue, Aug 17, 2010 at 9:03 AM, Zbyszek Szmek wrote: > Hi, > this is

Re: [Numpy-discussion] Seeking advice on crowded namespace.

2010-08-17 Thread Charles R Harris
On Tue, Aug 17, 2010 at 2:43 PM, Bruce Southey wrote: > On 08/16/2010 10:00 PM, Charles R Harris wrote: > > Hi All, > > > > I just added support for Legendre polynomials to numpy and I think the > > numpy.polynomial name space is getting a bit crowded. Since most of > > the current functions in

Re: [Numpy-discussion] Seeking advice on crowded namespace.

2010-08-17 Thread Bruce Southey
On 08/16/2010 10:00 PM, Charles R Harris wrote: > Hi All, > > I just added support for Legendre polynomials to numpy and I think the > numpy.polynomial name space is getting a bit crowded. Since most of > the current functions in that namespace are just used to implement the > Polynomial, Cheb

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Charles R Harris
On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke wrote: > > > On 8/17/2010 8:23 AM, Ralf Gommers wrote: > >> I am pleased to announce the availability of the second beta of NumPy >> 1.5.0. This will be the first NumPy release to include support for >> Python 3, as well as for Python 2.7. >> >> P

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Christoph Gohlke
On 8/17/2010 8:23 AM, Ralf Gommers wrote: I am pleased to announce the availability of the second beta of NumPy 1.5.0. This will be the first NumPy release to include support for Python 3, as well as for Python 2.7. Please try this beta and report any problems on the NumPy mailing list. Especi

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Charles R Harris
On Tue, Aug 17, 2010 at 11:27 AM, Michael Droettboom wrote: > I'm getting one unit test error on SunOS 5.8 UltraSPARC 5, with Sun > WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20: > > == > ERROR: test_ldexp (test_umath.Tes

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Bruce Southey
On 08/17/2010 11:51 AM, Sandro Tosi wrote: > Hello, > > On Tue, Aug 17, 2010 at 17:23, Ralf Gommers > wrote: >> I am pleased to announce the availability of the second beta of NumPy 1.5.0. >> This will be the first NumPy release to include support for Python 3, as >> well as for Python 2.7. >>

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Nikolaus Rath
Warren Weckesser writes: > Nikolaus Rath wrote: >> Hello, >> >> I want to find the first i such that x[i] < y and x[i+1] >= y. Is there >> a way to do this without using a Python loop? >> >> I can't use np.searchsorted(), because my x array crosses y several >> times. >> > > In [34]: np.where((x[:

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Nikolaus Rath
Lane Brooks writes: > On 08/17/2010 09:53 AM, Nikolaus Rath wrote: >> Hello, >> >> I want to find the first i such that x[i]< y and x[i+1]>= y. Is there >> a way to do this without using a Python loop? >> >> I can't use np.searchsorted(), because my x array crosses y several >> times. >> >> >> Be

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Nikolaus Rath
Alan G Isaac writes: > On 8/17/2010 11:53 AM, Nikolaus Rath wrote: >> I want to find the first i such that x[i]< y and x[i+1]>= y. Is there >> a way to do this without using a Python loop? > > > argmax? (to get i+1): > >>> d = np.linspace(0,10,101) > >>> x = np.sin(d) >

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Michael Droettboom
I'm getting one unit test error on SunOS 5.8 UltraSPARC 5, with Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20: == ERROR: test_ldexp (test_umath.TestLdexp) -

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Sandro Tosi
Hello, On Tue, Aug 17, 2010 at 17:23, Ralf Gommers wrote: > I am pleased to announce the availability of the second beta of NumPy 1.5.0. > This will be the first NumPy release to include support for Python 3, as > well as for Python 2.7. > > Please try this beta and report any problems on the Num

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Pierre GM
On Aug 17, 2010, at 12:27 PM, Alan G Isaac wrote: > On 8/17/2010 12:07 PM, Pierre GM wrote: >> What does a np.ma.test() give you ? > > No problems. (Aren't those always run?) > Alan Yes, but I just wanted to check whether I was to blame for not having ported some changes to the 1.5.x branch o

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Warren Weckesser
Nikolaus Rath wrote: > Hello, > > I want to find the first i such that x[i] < y and x[i+1] >= y. Is there > a way to do this without using a Python loop? > > I can't use np.searchsorted(), because my x array crosses y several > times. > > > Best, > >-Nikolaus > > Here's one way: In [32]: x

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Lane Brooks
On 08/17/2010 09:53 AM, Nikolaus Rath wrote: > Hello, > > I want to find the first i such that x[i]< y and x[i+1]>= y. Is there > a way to do this without using a Python loop? > > I can't use np.searchsorted(), because my x array crosses y several > times. > > > Best, > > -Nikolaus > i = num

Re: [Numpy-discussion] Find insertion point

2010-08-17 Thread Alan G Isaac
On 8/17/2010 11:53 AM, Nikolaus Rath wrote: > I want to find the first i such that x[i]< y and x[i+1]>= y. Is there > a way to do this without using a Python loop? argmax? (to get i+1): >>> d = np.linspace(0,10,101) >>> x = np.sin(d) >>> np.argmax(x>=0.5) 6 f

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Bruce Southey
On Tue, Aug 17, 2010 at 10:23 AM, Ralf Gommers wrote: > I am pleased to announce the availability of the second beta of NumPy 1.5.0. > This will be the first NumPy release to include support for Python 3, as > well as for Python 2.7. > > Please try this beta and report any problems on the NumPy ma

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Alan G Isaac
On 8/17/2010 12:07 PM, Pierre GM wrote: > What does a np.ma.test() give you ? No problems. (Aren't those always run?) Alan >>> np.ma.test() Running unit tests for numpy.ma NumPy version 1.5.0b2 NumPy is installed in C:\Python27\lib\site-packages\numpy Python version 2.7 (r27:82525, Jul 4 2010,

[Numpy-discussion] Find insertion point

2010-08-17 Thread Nikolaus Rath
Hello, I want to find the first i such that x[i] < y and x[i+1] >= y. Is there a way to do this without using a Python loop? I can't use np.searchsorted(), because my x array crosses y several times. Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerp

Re: [Numpy-discussion] fancy indexing question

2010-08-17 Thread josef . pktd
On Tue, Aug 17, 2010 at 11:30 AM, Angus McMorland wrote: > Hi all, > > I'm having a bit of a brain block about the following fancy indexing > question, and am hoping someone can point me in the right direction. I > have a 3-d array `a` that I want to reorder along its 0th dimension > differently f

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Pierre GM
On Aug 17, 2010, at 12:04 PM, Alan G Isaac wrote: > Two warnings remain; no failures. > Details below. > Alan Isaac > (Python 2.7 on Vista) What does a np.ma.test() give you ? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Alan G Isaac
Two warnings remain; no failures. Details below. Alan Isaac (Python 2.7 on Vista) Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> np.test() Running unit tests for

[Numpy-discussion] fancy indexing question

2010-08-17 Thread Angus McMorland
Hi all, I'm having a bit of a brain block about the following fancy indexing question, and am hoping someone can point me in the right direction. I have a 3-d array `a` that I want to reorder along its 0th dimension differently for each 1st dimension, with the indices given in a 2-d array `ord`. I

[Numpy-discussion] ANN: NumPy 1.5.0 beta 2

2010-08-17 Thread Ralf Gommers
I am pleased to announce the availability of the second beta of NumPy 1.5.0. This will be the first NumPy release to include support for Python 3, as well as for Python 2.7. Please try this beta and report any problems on the NumPy mailing list. Especially with Python 3 testing will be very useful

Re: [Numpy-discussion] array manipulation

2010-08-17 Thread Warren Weckesser
Alex Ter-Sarkissov wrote: > hi, this is probably a very silly question, but I can't get my hear > around it unfortunately( > > I have an array (say, mat=rand(3,5)) from which I 'pull out' a row > (say, s1=mat[1,]). The problem is, the shape of this row s1 is not > [1,5], as I would expect, but

Re: [Numpy-discussion] set operation

2010-08-17 Thread John Salvatier
It should be noted that the 'set' type is a basic Python type, and not a NumPy specific type. On Tue, Aug 17, 2010 at 7:30 AM, Benjamin Root wrote: > On Tue, Aug 17, 2010 at 9:11 AM, gerardob wrote: > >> >> I would like to create a set composed of the numbers 2,3,4,...49,50,51. >> How >> do i d

Re: [Numpy-discussion] set operation

2010-08-17 Thread Benjamin Root
On Tue, Aug 17, 2010 at 9:11 AM, gerardob wrote: > > I would like to create a set composed of the numbers 2,3,4,...49,50,51. How > do i do? > Thanks. > Gerard, Well, you can easily create a list of those numbers like so: >>> a = range(2, 52) # note, you have to go one past the last number yo

[Numpy-discussion] set operation

2010-08-17 Thread gerardob
I would like to create a set composed of the numbers 2,3,4,...49,50,51. How do i do? Thanks. -- View this message in context: http://old.nabble.com/set-operation-tp29449267p29449267.html Sent from the Numpy-discussion mailing list archive at Nabble.com. _

[Numpy-discussion] numpy.concatenate slower than slice copying

2010-08-17 Thread Zbyszek Szmek
Hi, this is a problem which came up when trying to replace a hand-written array concatenation with a call to numpy.vstack: for some array sizes, numpy.vstack(data) runs > 20% longer than a loop like alldata = numpy.empty((tlen, dim)) for x in data: step = x.shape[0] all

Re: [Numpy-discussion] Problems building NumPy with GotoBLAS

2010-08-17 Thread Eloi Gaudry
Peter, please below a script that will build numpy using a relevant site.cfg for your configuration (you need to update GOTODIR and LAPACKDIR and PYTHONDIR): #!/bin/sh #BLAS/LAPACK configuration file echo "[blas]" > ./site.cfg echo "library_dirs = GOTODIR">> ./

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 1

2010-08-17 Thread Ralf Gommers
On Mon, Aug 16, 2010 at 11:51 PM, Skipper Seabold wrote: > On Mon, Aug 16, 2010 at 11:36 AM, Ralf Gommers > wrote: > > > > > > On Mon, Aug 16, 2010 at 4:50 PM, Sandro Tosi wrote: > >> > >> Hi all, > >> sorry for the delay > >> > >> On Sun, Aug 1, 2010 at 18:38, Ralf Gommers > > >> wrote: > >> >

Re: [Numpy-discussion] array manipulation

2010-08-17 Thread Alan G Isaac
On 8/17/2010 12:13 AM, Alex Ter-Sarkissov wrote: > I have an array (say, mat=rand(3,5)) from which I 'pull out' a row > (say, s1=mat[1,]). The problem is, the shape of this row s1 is not > [1,5], as I would expect, but rather [5,], which means that I can't, > for example, concateante mat and s1 row