Re: [Numpy-discussion] FFTW?? Do I need it to do Fourier transforms?

2009-04-10 Thread Jon Wright
Charles R Harris wrote: > On Fri, Apr 10, 2009 at 8:33 PM, John Seales > wrote: > > The link to FFTW on http://www.scipy.org/Installing_SciPy/Mac_OS_X > is broken. > > Is it needed to do Fourier Transforms? My main motivation for using > numpy and

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Charles R Harris
On Fri, Apr 10, 2009 at 11:25 PM, David Cournapeau wrote: > On Sat, Apr 11, 2009 at 1:00 PM, Charles R Harris > wrote: > > > I think hg works in a similar manner to git. At least Linus said so in > that > > old google talk ;) > > Yes, compared to svn, hg, git and bzr are quite similar in a way. I

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 1:00 PM, Charles R Harris wrote: > I think hg works in a similar manner to git. At least Linus said so in that > old google talk ;) Yes, compared to svn, hg, git and bzr are quite similar in a way. I think the differences still matter, though. > But hg doesn't/didn't hav

[Numpy-discussion] Bug or feature?

2009-04-10 Thread Charles R Harris
Ticket #1083 , In [3]: np.array([324938], dtype=np.uint8) Out[3]: array([74], dtype=uint8) i.e., 324938 is silently downcast. This is common numpy behavior, but I wonder if this case shouldn't be an exception. Or in general, if conversion from out of r

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
David Cournapeau wrote: > On Sat, Apr 11, 2009 at 6:16 AM, Eric Firing wrote: > >> On my laptop, switching back and forth between the two active branches >> of mpl takes about 3 s for the first and 2 s for the second, timed by >> counting in my head. > > I think Ondrej cares more about being fas

Re: [Numpy-discussion] help getting started

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 1:14 PM, Christopher Barker wrote: > David Cournapeau wrote: >> wrote: >>> Last I checked, the binary for ScipPy was broken, you'll need to get >>> gfortran and compile it yourself, as the page tells you. >> >> This should really be fixed, it is not acceptable to have a br

Re: [Numpy-discussion] help getting started

2009-04-10 Thread Christopher Barker
David Cournapeau wrote: > wrote: >> Last I checked, the binary for ScipPy was broken, you'll need to get >> gfortran and compile it yourself, as the page tells you. > > This should really be fixed, it is not acceptable to have a broken > binary. I will generate a new one, That would be great. II

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Charles R Harris
On Fri, Apr 10, 2009 at 9:49 PM, David Cournapeau wrote: > On Sat, Apr 11, 2009 at 12:37 PM, Charles R Harris > wrote: > > > > > > On Fri, Apr 10, 2009 at 8:17 PM, David Cournapeau > > wrote: > >> > >> On Sat, Apr 11, 2009 at 10:59 AM, Eric Firing > wrote: > >> > >> > > >> > Important note: if

Re: [Numpy-discussion] help getting started

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 5:42 AM, Christopher Barker wrote: > > Last I checked, the binary for ScipPy was broken, you'll need to get > gfortran and compile it yourself, as the page tells you. This should really be fixed, it is not acceptable to have a broken binary. I will generate a new one, Da

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 12:37 PM, Charles R Harris wrote: > > > On Fri, Apr 10, 2009 at 8:17 PM, David Cournapeau > wrote: >> >> On Sat, Apr 11, 2009 at 10:59 AM, Eric Firing wrote: >> >> > >> > Important note: if there are any uncommitted changes when you run git >> > checkout, Git will behave

Re: [Numpy-discussion] FFTW?? Do I need it to do Fourier transforms?

2009-04-10 Thread Charles R Harris
On Fri, Apr 10, 2009 at 8:33 PM, John Seales wrote: > The link to FFTW on http://www.scipy.org/Installing_SciPy/Mac_OS_X is > broken. > > Is it needed to do Fourier Transforms? My main motivation for using numpy > and scipy is to do spectral analysis of sound. > > No, it isn't needed. The fft i

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Charles R Harris
On Fri, Apr 10, 2009 at 8:17 PM, David Cournapeau wrote: > On Sat, Apr 11, 2009 at 10:59 AM, Eric Firing wrote: > > > > > Important note: if there are any uncommitted changes when you run git > > checkout, Git will behave very strangely. The strangeness is predictable > > and sometimes useful, bu

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 11:53 AM, Eric Firing wrote: > > Please understand, I am not trying to bash git--it is clearly an > enormously powerful and well-made tool--and I apologize if my posts have > appeared to tend in that direction. No need to apologize, I think I used the work bashing inappro

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 6:16 AM, Eric Firing wrote: > > On my laptop, switching back and forth between the two active branches > of mpl takes about 3 s for the first and 2 s for the second, timed by > counting in my head. I think Ondrej cares more about being faster than most of us - he is just

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
David Cournapeau wrote: > On Sat, Apr 11, 2009 at 10:59 AM, Eric Firing wrote: > >> Important note: if there are any uncommitted changes when you run git >> checkout, Git will behave very strangely. The strangeness is predictable >> and sometimes useful, but it is best to avoid it. All you need t

[Numpy-discussion] FFTW?? Do I need it to do Fourier transforms?

2009-04-10 Thread John Seales
The link to FFTW on http://www.scipy.org/Installing_SciPy/Mac_OS_X is broken. Is it needed to do Fourier Transforms? My main motivation for using numpy and scipy is to do spectral analysis of sound. _ Rediscover Hotmail®: Get qu

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 10:59 AM, Eric Firing wrote: > > Important note: if there are any uncommitted changes when you run git > checkout, Git will behave very strangely. The strangeness is predictable > and sometimes useful, but it is best to avoid it. All you need to do, of > course, is commit

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 10:30 AM, wrote: > > I updated my eclipse so I can try out the git eclipse plugin. Except > for a description how to clone a github repository and push back to > it, I didn't find much information on the internet. FWIW, I tried the eclipse plugin yesterday, and I did not

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
Matthew Brett wrote: > Hi, > > I enjoyed this quote from http://www.eecs.harvard.edu/~cduan/technical/git/ > > Summary: You can only really use Git if you understand how Git works. Matthew, Nice link, thank you. Another couple of quotes from that tutorial: Important note: if there are any unc

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread josef . pktd
On Fri, Apr 10, 2009 at 5:47 PM, Matthew Brett wrote: > Hi, > > I enjoyed this quote from http://www.eecs.harvard.edu/~cduan/technical/git/ > > Summary: You can only really use Git if you understand how Git works. > > "When I first started using Git, I read plenty of tutorials, as well > as the us

[Numpy-discussion] Using where with tuples

2009-04-10 Thread Frank Peacock
Hello I am trying to use the where function on a numpy array which was obtained from an image using the asarray function. The code is as follows: from numpy import * from Image import * im=open("a.gif") im2=im.convert("RGBA") a2 = asarray(im2,uint8) c = zeros((140,90,4),uint8) c[:,:]

Re: [Numpy-discussion] Constant array of tuples

2009-04-10 Thread Christopher Barker
Frank Peacock wrote: > Hello > > I would like to know whether there is a simple way to construct a constant > array of tuples: > > How do I construct an array of size (width*height) where each element is > (w,x,y,z) Is this what you want? a = np.empty((5,6), dtype=np.object) >>> for i in range

Re: [Numpy-discussion] numpy.ma.arg{min,max}

2009-04-10 Thread Adam Oliner
Christoper, I see, thanks. Then the documentation should say that it returns an array of the _smallest_ indices of the minimum values along the given axis. If the minimum value is not unique, as in my examples, is there an efficient way to get all of these indices? It seems that I can get

Re: [Numpy-discussion] numpy.ma.arg{min,max}

2009-04-10 Thread Christopher Barker
Adam Oliner wrote: > The documentation for numpy.ma.argmin says: > "Returns array of indices of the maximum values along the given axis." > > Aside from probably meaning to say the 'minimum' values, that's a typo... > it also doesn't seem to return an array: it does if you use a higher rank ar

[Numpy-discussion] Constant array of tuples

2009-04-10 Thread Frank Peacock
/linalg/linalg.py", line 25, in ? ImportError: liblapack.so.3: cannot open shared object file: No such file or directory *I looked for liblapack.so.3 and find it in /usr/*lib*/liblapack.so.3. It seems it doesn't work because numpy 64 bits version seems to need /usr/* lib64*/libla

[Numpy-discussion] Replacing colours in numpy array 2

2009-04-10 Thread Frank Peacock
Hello Apologies for the incorrect posting before. The problem was that I was not using an array for the true condition and instead was using a scalar. Frank ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Matthew Brett
Hi, I enjoyed this quote from http://www.eecs.harvard.edu/~cduan/technical/git/ Summary: You can only really use Git if you understand how Git works. "When I first started using Git, I read plenty of tutorials, as well as the user manual. Though I picked up the basic usage patterns and commands,

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
David Cournapeau wrote: > Eric Firing wrote: >> This is simply wrong. Mercurial uses hard links for cloning a repo that >> is on the same disk, so it is faster and much more space-efficient than >> copying the files. > > Yes, but maybe Ondrej talks about an older hg version ? Hg could not > han

[Numpy-discussion] numpy.ma.arg{min,max}

2009-04-10 Thread Adam Oliner
Hi there, The documentation for numpy.ma.argmin says: "Returns array of indices of the maximum values along the given axis." Aside from probably meaning to say the 'minimum' values, it also doesn't seem to return an array: >>> a array([1, 1, 1, 5, 5]) >>> numpy.ma.argmax(a) 3 >>> numpy.ma.a

Re: [Numpy-discussion] [SciPy-user] LARS algorithm

2009-04-10 Thread emanuele
Per Sedeberg wrapped LARS (through RPy) in PyMVPA. Later he mentioned about a C implementation he found and it seems he's going to work on it: http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000404.html I guess you should contact him. Emanuele On Fri, April 10, 2009 10:04 p

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Christopher Barker
Well, there is a LOT to consider here, and I have virtually no experience with any of the DVCSs, so I don't have any conclusions to offer, but: Windows support matters. Tool support matters. Those should be taken into consideration when making a choice. -CHB -- Christopher Barker, Ph.D. Ocea

Re: [Numpy-discussion] help getting started

2009-04-10 Thread Christopher Barker
John Seales wrote: > loading the numpy or scipy module doesn't work, whether I do it at the > terminal command line or at the python interpreter. > > Anyone know what else might be wrong? we're going to have to know a lot more about what you've done so far, but; a) unless you have a strong reas

Re: [Numpy-discussion] help getting started

2009-04-10 Thread John Seales
loading the numpy or scipy module doesn't work, whether I do it at the terminal command line or at the python interpreter. Anyone know what else might be wrong? > Date: Sat, 11 Apr 2009 03:10:07 +0900 > From: courn...@gmail.com > To: numpy-discussion@scipy.org > Subject: Re: [Numpy-discussion]

[Numpy-discussion] LARS algorithm

2009-04-10 Thread Gael Varoquaux
Has anybody implemented the LARS[1] (least angle regression) algorithm for regularized regression in Python or in C binded in Python? I am about to start in such endeaviour, but I wanted to check if someone was willing to share code under a BSD-compatible license. Gaël [1] http://en.wikipedia.or

Re: [Numpy-discussion] help getting started

2009-04-10 Thread Zachary Pincus
Hi John, First, did you build your own Python 2.6 or install from a binary? When you type "python" at the command prompt, which python runs? (You can find this out by running "which python" from the command line.) Second, it appears that numpy is *already installed* for a non-apple python 2

Re: [Numpy-discussion] help getting started

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 2:30 AM, John Seales wrote: > Intel mac. > Python 2.6. > > I'm trying to start using numpy and scipy, and am having trouble. > > I'm trying to install numpy following the instructions on > http://scipy.org/Installing_SciPy/Mac_OS_X . > > when I give the python setup.py buil

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
David Cournapeau wrote: > Eric Firing wrote: >> Speaking to Josef: does tortoise-hg provide a satisfactory windows gui, >> from your standpoint? >> > > Another solution may be eclipse integration. I don't know if that would > work for Josef, but there is a git plugin for eclipse, and I can at

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
On Sat, Apr 11, 2009 at 1:43 AM, Christopher Barker wrote: > David Cournapeau wrote: >>> we're really better off with a system with >>> good tool support on all platforms. >> >> Why ? We are not python, where many core developers work on windows. > > As I understand it there is a dearth of Python

[Numpy-discussion] help getting started

2009-04-10 Thread John Seales
Intel mac. Python 2.6. I'm trying to start using numpy and scipy, and am having trouble. I'm trying to install numpy following the instructions on http://scipy.org/Installing_SciPy/Mac_OS_X . when I give the python setup.py build command, it doesn't work. Here's my interaction at the terminal

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Ondrej Certik
> * I use Python for a bunch of other stuff Matlab is not suitable for -- > This is my argument about usability and tool support. A few years back, > CVS was a standard, now SVN is. I like that I can use the same tool to > contribute to a whole bunch of OS projects, and I use it to manage all > my

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Christopher Barker
David Cournapeau wrote: >> we're really better off with a system with >> good tool support on all platforms. > > Why ? We are not python, where many core developers work on windows. As I understand it there is a dearth of Python developers on Windows, too... But anyway, we probably want MORE Win

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
Hi Josef, josef.p...@gmail.com wrote: > > I tried out mercurial one year ago, including the eclipse plugin, but > it didn't work very well compared to the svn plugin. And since at that > time mercurial to svn connection wasn't very good, I gave up (I have > all my work in svn). I haven't used it s

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread josef . pktd
On Fri, Apr 10, 2009 at 5:13 AM, Matthieu Brucher wrote: > 2009/4/10 David Cournapeau : >> Eric Firing wrote: >>> Speaking to Josef: does tortoise-hg provide a satisfactory windows gui, >>> from your standpoint? >>> >> >> Another solution may be eclipse integration. I don't know if that would >> w

[Numpy-discussion] Replacing colours in numpy array

2009-04-10 Thread Frank Peacock
on of Numerical Python Message-ID: Content-Type: text/plain; charset="iso-8859-1" This seems to work: vecs = Numeric.random.standard_normal(size=(self.size[0],self.size[1],3)) magnitudes = Numeric.sqrt((vecs*vecs).sum(axis=-1)) uvecs = vecs / magnitudes[...,Numeric.newaxis] randlen =

Re: [Numpy-discussion] numpy import on x86_64 arch

2009-04-10 Thread David Cournapeau
Vincent Thierion wrote: > Hello, > > I import numpy module (numpy-1.0.4) on a x86_64 machine (on which I > don't have any root privileges) after having install it thanks to > python "setup.py install --prefix=../numpy". In this manner, I obtain > a 64 bits compatible numpy library. > (the "numpy" f

[Numpy-discussion] numpy import on x86_64 arch

2009-04-10 Thread Vincent Thierion
Hello, I import numpy module (numpy-1.0.4) on a x86_64 machine (on which I don't have any root privileges) after having install it thanks to python "setup.py install --prefix=../numpy". In this manner, I obtain a 64 bits compatible numpy library. (the "numpy" folder used for install is created jus

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Matthieu Brucher
2009/4/10 David Cournapeau : > Eric Firing wrote: >> Speaking to Josef: does tortoise-hg provide a satisfactory windows gui, >> from your standpoint? >> > > Another solution may be eclipse integration. I don't know if that would > work for Josef, but there is a git plugin for eclipse, and I can at

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
Eric Firing wrote: > Speaking to Josef: does tortoise-hg provide a satisfactory windows gui, > from your standpoint? > Another solution may be eclipse integration. I don't know if that would work for Josef, but there is a git plugin for eclipse, and I can at least clone branches from a remote

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Ondrej Certik
On Fri, Apr 10, 2009 at 1:07 AM, David Cournapeau wrote: > Eric Firing wrote: >> >> This is simply wrong.  Mercurial uses hard links for cloning a repo that >> is on the same disk, so it is faster and much more space-efficient than >> copying the files. > > Yes, but maybe Ondrej talks about an old

Re: [Numpy-discussion] frombuffer alignment for ctypes.Structure array

2009-04-10 Thread David Cournapeau
Roland Schulz wrote: > The is no align or aligned option to frombuffer. What is the best way > to tell numpy to align the data as the C-struct/ctypes.Stucture array is? You could add a 'fake' field in between to get the right alignment, maybe ? import numpy as N from ctypes import * class C(Stru

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread David Cournapeau
Eric Firing wrote: > > This is simply wrong. Mercurial uses hard links for cloning a repo that > is on the same disk, so it is faster and much more space-efficient than > copying the files. Yes, but maybe Ondrej talks about an older hg version ? Hg could not handle NTFS hardlink for some time,

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Ondrej Certik
On Fri, Apr 10, 2009 at 12:43 AM, Eric Firing wrote: > Ondrej Certik wrote: >> On Thu, Apr 9, 2009 at 10:45 PM, David Cournapeau >> wrote: >>> Ondrej Certik wrote: It is maybe easier to learn how to work with different clones, but once you start working with lots of patches and you need

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Eric Firing
Ondrej Certik wrote: > On Thu, Apr 9, 2009 at 10:45 PM, David Cournapeau > wrote: >> Ondrej Certik wrote: >>> It is maybe easier to learn how to work with different clones, but >>> once you start working with lots of patches and you need to reclone >>> all the time, then it's the wrong approach to

Re: [Numpy-discussion] DVCS at PyCon

2009-04-10 Thread Neil Muller
On Fri, Apr 10, 2009 at 7:56 AM, Ondrej Certik wrote: > It is maybe easier to learn how to work with different clones, but > once you start working with lots of patches and you need to reclone > all the time, then it's the wrong approach to work, as it takes lots > of time to copy the whole reposi

[Numpy-discussion] frombuffer alignment for ctypes.Structure array

2009-04-10 Thread Roland Schulz
Hi, I would like to create a ndarray view on an array of ctypes.Structure. (reason: see below). The problem is that the structure size is not falling on an alignment boundary and thus the size is bigger than its parts. A sample showing the problem: import numpy as N from ctypes import * class C

Re: [Numpy-discussion] Another Array

2009-04-10 Thread Robert Kern
On Fri, Apr 10, 2009 at 02:17, Anne Archibald wrote: > 2009/4/10 Ian Mallett : > >> The vectors are used to "jitter" each particle's initial speed, so that the >> particles go in different directions instead of moving all as one.  Using >> the unit vector causes the particles to make the smooth pa

[Numpy-discussion] frombuffer alignment for ctypes.Structure array

2009-04-10 Thread Roland Schulz
Hi, I would like to create a ndarray view on an array of ctypes.Structure. (reason: see below). The problem is that the structure size is not falling on an alignment boundary and thus the size is bigger than its parts. A sample showing the problem: import numpy as N from ctypes import * class C

Re: [Numpy-discussion] Another Array

2009-04-10 Thread Anne Archibald
2009/4/10 Ian Mallett : > The vectors are used to "jitter" each particle's initial speed, so that the > particles go in different directions instead of moving all as one.  Using > the unit vector causes the particles to make the smooth parabolic shape. > The jitter vectors much then be of a random

Re: [Numpy-discussion] Another Array

2009-04-10 Thread Ian Mallett
This seems to work: vecs = Numeric.random.standard_normal(size=(self.size[0],self.size[1],3)) magnitudes = Numeric.sqrt((vecs*vecs).sum(axis=-1)) uvecs = vecs / magnitudes[...,Numeric.newaxis] randlen = Numeric.random.random((self.size[0],self.size[1])) randuvecs = uvecs*randlen[...,Numeric.newaxi

Re: [Numpy-discussion] Another Array

2009-04-10 Thread Robert Kern
On Fri, Apr 10, 2009 at 01:58, Ian Mallett wrote: > On Thu, Apr 9, 2009 at 11:46 PM, Robert Kern wrote: >> >> Parabolic? They should be spherical. > > The particle system in the last screenshot was affected by gravity.  In the > absence of gravity, the results should be spherical, yes.  All the v