Re: [Numpy-discussion] intersect1d and setmember1d

2009-02-27 Thread Robert Cimrman
Zachary Pincus wrote: Hi, intersect1d and setmember1d doesn't give expected results in case there are duplicate values in either array becuase it works by sorting data and substracting previous value. Is there an alternative in numpy to get indices of intersected values. From the

[Numpy-discussion] ValueError: invalid literal for float()

2009-02-27 Thread Nils Wagner
Hi all, Is it possible to modify the behaviour of float wrt the following situation permas_M[0,2] '1.569809265137D+01' float(permas_M[0,2]) Traceback (most recent call last): File stdin, line 1, in module ValueError: invalid literal for float(): 1.569809265137D+01 The following

Re: [Numpy-discussion] ValueError: invalid literal for float()

2009-02-27 Thread Charles R Harris
On Fri, Feb 27, 2009 at 8:20 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, Is it possible to modify the behaviour of float wrt the following situation permas_M[0,2] '1.569809265137D+01' float(permas_M[0,2]) Traceback (most recent call last): File stdin, line 1, in

[Numpy-discussion] image processing using numpy-scipy?

2009-02-27 Thread Prashant Saxena
Hi, This a little wiered problem. I am having a black and white image. (black background) Entire image is filled with noisy white patterns of different size and shape. I need to fill the white patches if there area is more then given one. Logically this could possible to use a quickfill

Re: [Numpy-discussion] image processing using numpy-scipy?

2009-02-27 Thread Stéfan van der Walt
Hi Prashant 2009/2/27 Prashant Saxena animator...@yahoo.com: This a little wiered problem. I am having a black and white image. (black background) Entire image is filled with noisy white patterns of different size and shape. I need to fill the white patches if there area is more then given

[Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread David Cournapeau
Hi, That's a call for testing for 64 bits windows users out there: please try the following binary with the test suite: http://www.ar.media.kyoto-u.ac.jp/members/david/archives/numpy/numpy-1.3.0.dev6517.win-amd64-py2.6.exe python -c import numpy; numpy.test() Report any crash. I am

Re: [Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread Nathan Bell
On Fri, Feb 27, 2009 at 12:31 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Hi,    That's a call for testing for 64 bits windows users out there: please try the following binary with the test suite:

Re: [Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread David Cournapeau
On Sat, Feb 28, 2009 at 4:15 AM, Nathan Bell wnb...@gmail.com wrote: On Fri, Feb 27, 2009 at 12:31 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Hi,    That's a call for testing for 64 bits windows users out there: please try the following binary with the test suite:

Re: [Numpy-discussion] image processing using numpy-scipy?

2009-02-27 Thread Prashant Saxena
Well, I came up with a slightly different approach. Get the first row on the image. It would be something like this: [1,1,1,0,0,0,1,1,0,0,1] 1 = white, 0 = black. Run the floodfill on [0],[6] and [10] pixel if floodfill area is smaller then given area then paint that area black if floodfill area

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-27 Thread David Warde-Farley
Hey Jon, On 26-Feb-09, at 10:00 PM, Jonathan Taylor wrote: Am I right to assume that there is no way elegant way to interact with slices. i.e. Is there anyway to get a[ix_([2,3,6],:,[3,2])] to work? So that the dimension is completely specified? Or perhaps the only way to do this is

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-27 Thread Robert Kern
On Thu, Feb 26, 2009 at 21:00, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: Am I right to assume that there is no way elegant way to interact with slices.  i.e. Is there anyway to get a[ix_([2,3,6],:,[3,2])] to work?  So that the dimension is completely specified?  Or perhaps the only

Re: [Numpy-discussion] Speedup creation of a 3-color array from a 2-d color-index array a color lut

2009-02-27 Thread Robert Kern
On Fri, Feb 27, 2009 at 14:41, Delbert Franz d...@iqdotdt.com wrote: Message: 2 Date: Thu, 26 Feb 2009 23:32:35 -0600 From: Robert Kern robert.k...@gmail.com Subject: Re: [Numpy-discussion] Speedup creation of a 3-color array       from a  2-d color-index array a color lut To: Discussion of

Re: [Numpy-discussion] Bilateral filter

2009-02-27 Thread Zachary Pincus
Hi all, I just grabbed the latest bilateral filter from Stéfan's repository, but I can't get it to work! I'm using a recent numpy SVN and the latest release of cython... In [10]: bl = bilateral.bilateral(image, 2, 150)

Re: [Numpy-discussion] Speedup creation of a 3-color a rray from a 2-d color-index array a color lut

2009-02-27 Thread Delbert Franz
Message: 2 Date: Thu, 26 Feb 2009 23:32:35 -0600 From: Robert Kern robert.k...@gmail.com Subject: Re: [Numpy-discussion] Speedup creation of a 3-color array from a 2-d color-index array a color lut To: Discussion of Numerical Python numpy-discussion@scipy.org Message-ID:

Re: [Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread Nathan Bell
On Fri, Feb 27, 2009 at 2:33 PM, David Cournapeau courn...@gmail.com wrote: Great, thanks. Do you have VS installed ? Did you install python for all users (I would guess so, but I am not yet clear on all the details on that matter). I do not have VS installed. I just downloaded the official

Re: [Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread Darren Dale
On Fri, Feb 27, 2009 at 4:08 PM, Nathan Bell wnb...@gmail.com wrote: On Fri, Feb 27, 2009 at 2:33 PM, David Cournapeau courn...@gmail.com wrote: Great, thanks. Do you have VS installed ? Did you install python for all users (I would guess so, but I am not yet clear on all the details on

Re: [Numpy-discussion] Call for testing: full blas/lapack builds of numpy on windows 64 bits

2009-02-27 Thread Bruce Southey
Nathan Bell wrote: On Fri, Feb 27, 2009 at 2:33 PM, David Cournapeau courn...@gmail.com wrote: Great, thanks. Do you have VS installed ? Did you install python for all users (I would guess so, but I am not yet clear on all the details on that matter). I do not have VS installed.

[Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Brian Gerke
Hi- I'm quite new to numpy and to python in general, so I apologize if I'm missing something obvious, but I've come across some seemingly nasty behavior when trying to assign values to the fields of an indexed subarray of a numpy record array. Perhaps an example would explain it best.

Re: [Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Robert Kern
On Fri, Feb 27, 2009 at 18:26, Brian Gerke bge...@slac.stanford.edu wrote: Hi- I'm quite new to numpy and to python in general, so I apologize if I'm missing something obvious, but I've come across some seemingly nasty behavior when trying to assign values to the fields of an indexed

Re: [Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Pierre GM
As a follow-up to Robert's answer: r[r.field1 == 1].field2 = 1 doesn't work, but r.field2[r.field1==1] = 1 does. So far, so good. Now I want to change the value of field2 for those same elements: In [128]: r[where(r.field1 == 1.)].field2 = 1 Ok, so now the values of field

Re: [Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Brian Gerke
On Feb 27, 2009, at 4:30 PM, Robert Kern wrote: r[where(r.field1 == 1.)] make a copy. There is no way for us to construct a view onto the original memory for this circumstance given numpy's memory model. Many thanks for the quick reply. I assume that this is true only for record arrays,

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-27 Thread David Warde-Farley
On 27-Feb-09, at 3:35 PM, David Warde-Farley wrote: a[[2,3,6],:,:][:,:,[3,2]] should do what you want. Slightly more elegantly (I always forget about this syntax): a[[2,3,6], ...][..., [3,2]] David ___ Numpy-discussion mailing list

Re: [Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Robert Kern
On Fri, Feb 27, 2009 at 19:06, Brian Gerke bge...@slac.stanford.edu wrote: On Feb 27, 2009, at 4:30 PM, Robert Kern wrote: r[where(r.field1 == 1.)] make a copy. There is no way for us to construct a view onto the original memory for this circumstance given numpy's memory model. Many thanks