Re: [Numpy-discussion] finding index in an array...

2009-06-12 Thread josef . pktd
On Fri, Jun 12, 2009 at 7:08 PM, fred wrote: > Hi, > > Say I have an array A with shape (10,3) and > > A[3,:] = [1,2,3] > > I want to find the index of the array in which I have these values [1,2,3]. > > How can I do that? > > The only workaround I have found is to use a list: > > A.tolist().index(

[Numpy-discussion] finding index in an array...

2009-06-12 Thread fred
Hi, Say I have an array A with shape (10,3) and A[3,:] = [1,2,3] I want to find the index of the array in which I have these values [1,2,3]. How can I do that? The only workaround I have found is to use a list: A.tolist().index([1,2, 3]) That works fine, but is there a better solution (witho

Re: [Numpy-discussion] Elementary Array Switching

2009-06-12 Thread Robert Kern
On Fri, Jun 12, 2009 at 13:21, Ian Mallett wrote: > Hi, > > I have a NumPy array.  The array is 3D, n x n x 3.  I'm trying to flip the > first element of the last dimension with the last.  I tried: > temp = myarray[:,:,0].copy() > myarray[:,:,0] = myarray[:,:,2].copy() > myarray[:,:,2] = temp > del

[Numpy-discussion] Elementary Array Switching

2009-06-12 Thread Ian Mallett
Hi, I have a NumPy array. The array is 3D, n x n x 3. I'm trying to flip the first element of the last dimension with the last. I tried: temp = myarray[:,:,0].copy() myarray[:,:,0] = myarray[:,:,2].copy() myarray[:,:,2] = temp del temp But it doesn't work as expected. I'm definitely not very g

[Numpy-discussion] scipy 0.7.1 rc3

2009-06-12 Thread David Cournapeau
Hi, I have uploaded the binaries and source tarballs for 0.7.1rc3. The rc3 fixes some issues in scipy.special, which caused wrong behavior/crashes on some platforms. Hopefully, this will be the 0.7.1 release, cheers, David = SciPy 0.7.1 Release Notes

Re: [Numpy-discussion] RFC: add a install_clib numpy.distutils command to install pure C libraries

2009-06-12 Thread David Cournapeau
Gael Varoquaux wrote: > On Fri, Jun 12, 2009 at 07:46:04PM +0900, David Cournapeau wrote: > >> I have finally spent some time so that we can install pure C >> libraries using numpy.distutils. With this, one could imagine having a C >> library for fft, special functions in numpy or scipy, so

Re: [Numpy-discussion] RFC: add a install_clib numpy.distutils command to install pure C libraries

2009-06-12 Thread Gael Varoquaux
On Fri, Jun 12, 2009 at 07:46:04PM +0900, David Cournapeau wrote: > I have finally spent some time so that we can install pure C > libraries using numpy.distutils. With this, one could imagine having a C > library for fft, special functions in numpy or scipy, so that the > library could be reus

[Numpy-discussion] RFC: add a install_clib numpy.distutils command to install pure C libraries

2009-06-12 Thread David Cournapeau
Hi, I have finally spent some time so that we can install pure C libraries using numpy.distutils. With this, one could imagine having a C library for fft, special functions in numpy or scipy, so that the library could be reused in another package at the C level. If someone knowledgeable about

[Numpy-discussion] numpy test and "true division"

2009-06-12 Thread Sebastian Haase
Hi all, first off - I'm happy that I finally figured out how to run the test suite, and I get only one failure (Debian 64-bit, Numpy 1.3.0, "FAIL: Ticket #950") Before though, I got:Ran 2031 tests in 5.272s FAILED (KNOWNFAIL=1, SKIP=11, errors=3, failures=8) Then I realized that I changed my

[Numpy-discussion] Unite a Rectangular Unicode Array into one newline-separated string

2009-06-12 Thread Cristi Constantin
Good day. I am trying to unite a Rectangular Unicode Array into one newline-separated string. Basically each line is separated by next line with '\n',   and all characters from one line are merged. For example: import numpy as np a = np.arange(12).reshape(3,4) a = np.asarray(a,'U') # Method