Re: [Numpy-discussion] views or copy

2009-04-06 Thread Robert Kern
On Mon, Apr 6, 2009 at 22:31, wrote: > I ran again into a problem where numpy created a view (which I didn't > realize) and an operation works differently on the view than if it > were a copy. > > I try to construct an example array, which, however, is only a view > x,y = np.mgrid[0:3,0:3] >

[Numpy-discussion] views or copy

2009-04-06 Thread josef . pktd
I ran again into a problem where numpy created a view (which I didn't realize) and an operation works differently on the view than if it were a copy. I try to construct an example array, which, however, is only a view >>> x,y = np.mgrid[0:3,0:3] >>> xx = np.vstack((x.flatten(), y.flatten(), np.on

Re: [Numpy-discussion] how to delete the duplicated data in numpy?

2009-04-06 Thread josef . pktd
On Mon, Apr 6, 2009 at 9:46 PM, frank wang wrote: > > > Hi, > > I have just noticed that I did not change the title of my question. So I > resend it out. Sorry for the mistake. Here is my question. > > I have a big 2 column data file where the data are repeated either 5 or 6 > times. Are there any

Re: [Numpy-discussion] Construct a large n-dimensional complex matrix

2009-04-06 Thread Robert Kern
On Mon, Apr 6, 2009 at 20:53, Nathan Faggian wrote: > HI, > I want to construct a large complex matrix, I have the real and imaginary > components as double vectors, is there a fast way to construct a complex > vector in numpy? C = np.empty((n,m), dtype=complex) C.real.flat[:] = real_values C.ima

[Numpy-discussion] Construct a large n-dimensional complex matrix

2009-04-06 Thread Nathan Faggian
HI, I want to construct a large complex matrix, I have the real and imaginary components as double vectors, is there a fast way to construct a complex vector in numpy? Cheers, Nathan. Nathan Faggian, Ph.D. The

[Numpy-discussion] how to delete the duplicated data in numpy?

2009-04-06 Thread frank wang
Hi, I have just noticed that I did not change the title of my question. So I resend it out. Sorry for the mistake. Here is my question. I have a big 2 column data file where the data are repeated either 5 or 6 times. Are there any quick way to remove the duplicated data? Thanks Fran

Re: [Numpy-discussion] replace voids in 2d dat with nearest neighbour value

2009-04-06 Thread frank wang
Hi, I have a big 2 column data file where the data are repeated either 5 or 6 times. Are there any quick way to remove the duplicated data? Thanks Frank _ Rediscover Hotmail®: Get e-mail storage that grows with you. htt

Re: [Numpy-discussion] DVCS at PyCon

2009-04-06 Thread Ondrej Certik
On Mon, Mar 30, 2009 at 10:59 PM, David Cournapeau wrote: > Eric Firing wrote: >> >> I agree.  The PEP does not show overwhelming superiority (or, arguably, >> even mild superiority) of any alternative > > I think this PEP was poorly written. You can't see any of the > advantage/differences of the

Re: [Numpy-discussion] replace voids in 2d dat with nearest neighbour value

2009-04-06 Thread Jim Vickroy
Zachary Pincus wrote: Hi Christian, Check out this discussion from a little while ago on a very similar issue (but in 3d): http://www.nabble.com/Help-with-interpolating-missing-values-from-a-3D-scanner-td21489413.html Most of the suggestions should be directly applicable. Zach Hi Christ

Re: [Numpy-discussion] replace voids in 2d dat with nearest neighbour value

2009-04-06 Thread Zachary Pincus
Hi Christian, Check out this discussion from a little while ago on a very similar issue (but in 3d): http://www.nabble.com/Help-with-interpolating-missing-values-from-a-3D-scanner-td21489413.html Most of the suggestions should be directly applicable. Zach On Apr 6, 2009, at 9:01 AM, Christia

[Numpy-discussion] 1.3.0 release notes erratum

2009-04-06 Thread Zachary Pincus
Hi David, Thanks again for bundling in the architecture-specification flag into the numpy superpack installers: being able to choose sse vs. nosse installs is really helpful to me, and from what I hear, many others as well! Anyhow, I just noticed (sorry I didn't see this before the release)

[Numpy-discussion] replace voids in 2d dat with nearest neighbour value

2009-04-06 Thread Christian K .
Hi, I am looking for an elegant and fast way to fill the voids of a 2d array with neighbouring values. The array's size can be up to (1000, 1000) and its values are slowly varying around a mean value. What I call voids are values which are far from the mean value (+- 80%). A void usually extend