Re: [Numpy-discussion] Meshgrid with Huge Arrays

2010-10-07 Thread Nadav Horesh
You should avoid meshgrid, as the follows: ... #3D ARRAY XArray = np.arange(0, NrHorPixels, 1./sqrt(NrCellsPerPixel)) YArray = np.arange(0, NrVerPixels, 1./sqrt(NrCellsPerPixel)) Z = Amplitude*exp(-(((XArray-GaussianCenterX)**2/(2*SigmaX**2))+((YArray[:,None]-GaussianCenterY)**/(2*SigmaY**2

Re: [Numpy-discussion] point line distance

2010-10-07 Thread Sebastian Haase
Hi, in my Priithon project I the got from this Minimum Distance between a Point and a Line Written by Paul Bourke,October 1988 http://astronomy.swin.edu.au/~pbourke/geometry/pointline/ def geoPointLineDist(p, seg, testSegmentEnds=False):: ...

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Ralf Gommers
On Wed, Oct 6, 2010 at 8:12 AM, Charles R Harris charlesr.har...@gmail.comwrote: On Tue, Oct 5, 2010 at 5:49 PM, Pauli Virtanen p...@iki.fi wrote: Hi, Should we set a date for a bugfix 1.5.1 release? There are some bugs that would be nice to sort out in the 1.5.x series: Any Python

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Pauli Virtanen
Thu, 07 Oct 2010 16:34:46 +0800, Ralf Gommers wrote: [clip] A 1.5.1 release soon would be good. All the issues above are already committed, is there anything else that needs to go in? If not, I think an RC by the end of next week (10/17) and release by the end of the month should be possible.

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Pierre GM
On Oct 7, 2010, at 4:48 AM, Chris Fonnesbeck wrote: The documentation for loadtxt and genfromtxt state that the unpack argument functions as follows: If True, the returned array is transposed, so that arguments may be unpacked using x, y, z = loadtxt(...). Provided that all the columns

Re: [Numpy-discussion] test failure

2010-10-07 Thread Ralf Gommers
On Sat, Oct 2, 2010 at 12:51 PM, John Mitchell worka...@gmail.com wrote: After spending a lot of time building 'numpy' (1.5.0) and 'scipy' (0.8.0) I ran the following tests -- per what I read somewhere: numpy.test() Out of several thousand small tests I found this one error -- perhaps its

Re: [Numpy-discussion] Meshgrid with Huge Arrays

2010-10-07 Thread sicre
I used your suggestion, but it keeps getting me those errors mentioned, but on the definition of Z (line of the following code): from pylab import * import numpy as np #VARIABLES NrHorPixels=512 NrVerPixels=512 NrCellsPerPixel=16 GaussianCenterX=256 GaussianCenterY=256 SigmaX=1 SigmaY=1

Re: [Numpy-discussion] numpy mac binary for Python 2.7: which version is it for?

2010-10-07 Thread Ralf Gommers
On Wed, Oct 6, 2010 at 12:32 AM, Russell E. Owen ro...@uw.edu wrote: There are two Python 2.7 installers available at python.org a 32 bit version for MacOS X 10.3.9 and later and a 64 bit version for Mac OS X 10.5 and later. There is one numpy 1.5.0 binary installer for Mac Python 2.7. Which

[Numpy-discussion] DEV_README.txt update, SVN - git

2010-10-07 Thread Peter
Just FYI: The DEV_README.txt file needs a trivial update to talk about git not SVN http://github.com/numpy/numpy/blob/master/DEV_README.txt Regards, Peter ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Charles R Harris
On Thu, Oct 7, 2010 at 2:34 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: On Wed, Oct 6, 2010 at 8:12 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Oct 5, 2010 at 5:49 PM, Pauli Virtanen p...@iki.fi wrote: Hi, Should we set a date for a bugfix 1.5.1 release?

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Pauli Virtanen
Thu, 07 Oct 2010 07:09:37 -0600, Charles R Harris wrote: [clip] No, I just wanted to include the Laguerre and Hermite polynomials and add a domain keyword to the linspace method of the polynomial template. But I don't think these are pressing needs. It's a minor release, so I think we need to

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Ralf Gommers
On Thu, Oct 7, 2010 at 9:09 PM, Charles R Harris charlesr.har...@gmail.comwrote: On Thu, Oct 7, 2010 at 2:34 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: On Wed, Oct 6, 2010 at 8:12 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Oct 5, 2010 at 5:49 PM, Pauli

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Bruce Southey
On 10/07/2010 08:45 AM, Ralf Gommers wrote: On Thu, Oct 7, 2010 at 9:09 PM, Charles R Harris charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote: On Thu, Oct 7, 2010 at 2:34 AM, Ralf Gommers ralf.gomm...@googlemail.com mailto:ralf.gomm...@googlemail.com wrote:

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Charles R Harris
On Thu, Oct 7, 2010 at 7:45 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: On Thu, Oct 7, 2010 at 9:09 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Oct 7, 2010 at 2:34 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Oct 6, 2010 at 8:12 AM, Charles R

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Pierre GM
On Oct 7, 2010, at 3:49 PM, Benjamin Root wrote: I understand the technicalities of why this occurs, but from a user's perspective, he is asking for distinct numpy arrays of specified types. The transposing seems to be almost an unimportant implementation detail because the user is

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Pierre GM
Just asking, Should I backport some bugs that were corrected in 2.0 for numpy.ma ? I don't have any particular in mind, but I'm sure there must be some... ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Chris Fonnesbeck
On Thu, Oct 7, 2010 at 4:00 AM, Pierre GM pgmdevl...@gmail.com wrote: On Oct 7, 2010, at 4:48 AM, Chris Fonnesbeck wrote: The documentation for loadtxt and genfromtxt state that the unpack argument functions as follows: If True, the returned array is transposed, so that arguments may be

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Chris Fonnesbeck
On Thu, Oct 7, 2010 at 8:59 AM, Pierre GM pgmdevl...@gmail.com wrote: Not needed. The unpack argument is used as the very end of the function anyway. Anyhow, could you open a ticket to that effect (else I'm quite likely to forget about it). I can open this one.

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Pierre GM
On Oct 7, 2010, at 4:01 PM, Chris Fonnesbeck wrote: On Thu, Oct 7, 2010 at 4:00 AM, Pierre GM pgmdevl...@gmail.com wrote: On Oct 7, 2010, at 4:48 AM, Chris Fonnesbeck wrote: The documentation for loadtxt and genfromtxt state that the unpack argument functions as follows: If True, the

Re: [Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented

2010-10-07 Thread Benjamin Root
On Thu, Oct 7, 2010 at 8:59 AM, Pierre GM pgmdevl...@gmail.com wrote: On Oct 7, 2010, at 3:49 PM, Benjamin Root wrote: I understand the technicalities of why this occurs, but from a user's perspective, he is asking for distinct numpy arrays of specified types. The transposing seems to be

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Ralf Gommers
On Thu, Oct 7, 2010 at 10:00 PM, Pierre GM pgmdevl...@gmail.com wrote: Just asking, Should I backport some bugs that were corrected in 2.0 for numpy.ma ? I don't have any particular in mind, but I'm sure there must be some... That would be helpful. Please backport any bug fixes that you

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Ralf Gommers
On Thu, Oct 7, 2010 at 9:54 PM, Bruce Southey bsout...@gmail.com wrote: I agree that this is a good idea to have this minor release with as few changes as possible. This allows us to clearly state everything has moved to git and localize any problems that users should not have related to the

Re: [Numpy-discussion] ndarray of object dtype

2010-10-07 Thread Ioan Ferencik
Hello Robert, I dare to bother you again with some questions. this time I have a numpy array with fields ar = array([(1.0, 2.0, 3, 4), (2.0, 3.0, 4, 5)], dtype={'names': ['q','wl','cssid','br'], 'formats':['f4', 'f4', 'i4', 'i4'], 'offsets': [0, 4, 8, 12]}, order='F') on C API I want to

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 1:31 AM, Charles R Harris wrote: On Wed, Oct 6, 2010 at 11:07 PM, Andrew P. Mullhaupt d...@zen-pharaohs.com mailto:d...@zen-pharaohs.com wrote: I came across this gem yesterday from numpy import * R = ones((2)) R[0] = R[0] * 1j

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Nils Wagner
On Thu, 7 Oct 2010 09:06:55 + (UTC) Pauli Virtanen p...@iki.fi wrote: Thu, 07 Oct 2010 16:34:46 +0800, Ralf Gommers wrote: [clip] A 1.5.1 release soon would be good. All the issues above are already committed, is there anything else that needs to go in? If not, I think an RC by the

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Pauli Virtanen
to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt kirjoitti: [clip] No. You can define the arrays as backed by mapped files with real and imaginary parts separated. Then the imaginary part, being initially zero, is a sparse part of the file, takes only a fraction of the space (and, on

Re: [Numpy-discussion] known failure test decorator not treated as expected by nose

2010-10-07 Thread Jonathan March
On Wed, Oct 6, 2010 at 6:17 PM, josef.p...@gmail.com wrote: On Wed, Oct 6, 2010 at 7:08 PM, Jonathan March jma...@enthought.com wrote: It appears that the numpy testing decorators for skipping and for known failure should behave similarly to each other, at least from their descriptions here:

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Nils Becker
Hi, what about the normed=True bug in numpy.histogram? It was discussed here a while ago, and fixed (although i did not find it on the tracker), but the message aanlktikwbsrxq0ynf3u3jo3ekrikszmwqy30pnsfg...@mail.gmail.com suggests it just missed 1.5.0? I don't have 1.5 installed, so I can't

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 1:01 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt kirjoitti: [clip] But to implement this, you'd have to rewrite large parts of Numpy since the separated storage of re/im conflicts with its memory model. You wouldn't want to rewrite any of

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread josef . pktd
On Thu, Oct 7, 2010 at 3:38 PM, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote:  On 10/7/2010 1:01 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt kirjoitti: [clip] But to implement this, you'd have to rewrite large parts of Numpy since the separated storage

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Anne Archibald
On 7 October 2010 13:01, Pauli Virtanen p...@iki.fi wrote: to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt kirjoitti: [clip] No. You can define the arrays as backed by mapped files with real and imaginary parts separated. Then the imaginary part, being initially zero, is a sparse part

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Pauli Virtanen
Thu, 07 Oct 2010 18:02:43 -0400, Andrew P. Mullhaupt wrote: On 10/7/2010 3:45 PM, josef.p...@gmail.com wrote: what's your namespace?from scipy import log log(int(-2)) (0.69314718055994529+3.1415926535897931j) This should explain: R = ones(2) R[0] = R[0] * 1j R array([ 0., 1.])

Re: [Numpy-discussion] Schedule for 1.5.1?

2010-10-07 Thread Dr. David Kirkby
On 10/ 6/10 12:49 AM, Pauli Virtanen wrote: Hi, Should we set a date for a bugfix 1.5.1 release? There are some bugs that would be nice to sort out in the 1.5.x series: Any Python versions: - #1605 (Cython vs. PEP-3118 issue: raising exceptions with active cython buffers caused

[Numpy-discussion] numpy.distutils

2010-10-07 Thread Charles Doutriaux
Hi, I'm not sure if this is a numpy.distutils or a regular distutils issue so please excuse me if it doesn't belong here. I 'm using numpy 1.4.1 and I have a C extension (using numpy arrays) that I built with numpy. When I'm debugging I frequently have to rebuild. It use to rebuild only the C

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 3:48 PM, Anne Archibald wrote: Years ago MATLAB did just this - store real and complex parts of arrays separately (maybe it still does, I haven't used it in a long time). It caused us terrible performance headaches, Years ago performance headaches from Matlab are not exactly

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Matthew Brett
Hi, On Thu, Oct 7, 2010 at 3:47 PM, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote:  On 10/7/2010 3:48 PM, Anne Archibald wrote: Years ago MATLAB did just this - store real and complex parts of arrays separately (maybe it still does, I haven't used it in a long time). It caused us terrible

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 5:14 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 15:38 -0400, Andrew P. Mullhaupt kirjoitti: [clip] On 10/7/2010 1:01 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt kirjoitti: [clip] But to implement this, you'd have to rewrite large parts

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Robert Kern
On Thu, Oct 7, 2010 at 18:46, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote:  On 10/7/2010 5:14 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 15:38 -0400, Andrew P. Mullhaupt kirjoitti: [clip] On 10/7/2010 1:01 PM, Pauli Virtanen wrote: to, 2010-10-07 kello 12:08 -0400, Andrew P. Mullhaupt

Re: [Numpy-discussion] ndarray of object dtype

2010-10-07 Thread Robert Kern
On Thu, Oct 7, 2010 at 10:09, Ioan Ferencik ioan.feren...@tkk.fi wrote: Hello Robert, I dare to bother you again with some  questions. this time I have a numpy array with fields ar = array([(1.0, 2.0, 3, 4), (2.0, 3.0, 4, 5)], dtype={'names': ['q','wl','cssid','br'], 'formats':['f4', 'f4',

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Anne Archibald
On 7 October 2010 19:46, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote: It wouldn't be the first time I suggested rewriting the select and choose operations. I spent months trying to get Guido to let anything more than slice indexing in arrays. And now, in the technologically advanced

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 6:52 PM, Matthew Brett wrote: Hi, On Thu, Oct 7, 2010 at 3:47 PM, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote: Most machines now and in the future are not going to choke on these issues (for a variety of reasons). 'Talk is cheap, show me the code' . Yes, let's. First

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread Andrew P. Mullhaupt
On 10/7/2010 8:21 PM, Robert Kern wrote: On Thu, Oct 7, 2010 at 18:46, Andrew P. Mullhauptd...@zen-pharaohs.com wrote: It appears that your answer is YES, we COULD have that, BUT it would be a lot of work. You misread him. The answer is no. We will not change the memory model so

Re: [Numpy-discussion] Assigning complex value to real array

2010-10-07 Thread David Cournapeau
On Fri, Oct 8, 2010 at 11:47 AM, Andrew P. Mullhaupt d...@zen-pharaohs.com wrote:  On 10/7/2010 8:21 PM, Robert Kern wrote: On Thu, Oct 7, 2010 at 18:46, Andrew P. Mullhauptd...@zen-pharaohs.com   wrote: It appears that your answer is YES, we COULD have that, BUT it would be a lot of work.

Re: [Numpy-discussion] numpy.distutils

2010-10-07 Thread David Cournapeau
On Fri, Oct 8, 2010 at 7:40 AM, Charles Doutriaux doutria...@llnl.gov wrote: Did anybody else noticed this? Anybody know what changed (the fact that it's since Python 2.7 make me think it might be pure distutils related) Could you check whether you still see the issue without using