Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 14:46 +0900, David Cournapeau wrote: > Jochen wrote: > > On Tue, 2009-01-27 at 13:54 +0900, David Cournapeau wrote: > > > >> Jochen wrote: > >> > >>> On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: > >>> > >>> > Jochen wrote: > > >>>

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread David Cournapeau
Jochen wrote: > On Tue, 2009-01-27 at 13:54 +0900, David Cournapeau wrote: > >> Jochen wrote: >> >>> On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: >>> >>> Jochen wrote: > On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: >

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 13:54 +0900, David Cournapeau wrote: > Jochen wrote: > > On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: > > > >> Jochen wrote: > >> > >>> On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: > >>> > >>> > Jochen wrote: > > >>>

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread David Cournapeau
Jochen wrote: > On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: > >> Jochen wrote: >> >>> On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: >>> >>> Jochen wrote: > Hi all, > > I just wrote ctypes bindings to fftw3 (see >

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: > Jochen wrote: > > On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: > > > >> Jochen wrote: > >> > >>> Hi all, > >>> > >>> I just wrote ctypes bindings to fftw3 (see > >>> http://projects.scipy.org/pipermail/scipy-user/200

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread David Cournapeau
Jochen wrote: > On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: > >> Jochen wrote: >> >>> Hi all, >>> >>> I just wrote ctypes bindings to fftw3 (see >>> http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html >>> for the post to scipy). >>> Now I have a couple of

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: > Jochen wrote: > > Hi all, > > > > I just wrote ctypes bindings to fftw3 (see > > http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html > > for the post to scipy). > > Now I have a couple of numpy related questions: > >

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread David Cournapeau
Jochen wrote: > Hi all, > > I just wrote ctypes bindings to fftw3 (see > http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html > for the post to scipy). > Now I have a couple of numpy related questions: > > In order to be able to use simd instructions I > create an ndarray subcl

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Mon, 2009-01-26 at 19:25 -0600, Ryan May wrote: > Jochen wrote: > > Hi all, > > > > I just wrote ctypes bindings to fftw3 (see > > http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html > > for the post to scipy). > > Now I have a couple of numpy related questions: > > > > In

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Ryan May
Jochen wrote: > Hi all, > > I just wrote ctypes bindings to fftw3 (see > http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html > for the post to scipy). > Now I have a couple of numpy related questions: > > In order to be able to use simd instructions I > create an ndarray sub

[Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
Hi all, I just wrote ctypes bindings to fftw3 (see http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html for the post to scipy). Now I have a couple of numpy related questions: In order to be able to use simd instructions I create an ndarray subclass, which uses fftw_malloc to

Re: [Numpy-discussion] Usage of numpy.where and pylab.find with strings

2009-01-26 Thread Ariel Rokem
Doh! That's embarrassing! Thanks! On Jan 26, 2009, at 12:00 PM, Keith Goodman wrote: > On Mon, Jan 26, 2009 at 11:48 AM, Ariel Rokem > wrote: >> Hi - I am trying to find a string in a list with strings and have >> come >> across the following state of affairs: >> In [228]: subjects >> Out[22

Re: [Numpy-discussion] Bug with mafromtxt

2009-01-26 Thread Ryan May
Pierre GM wrote: > On Jan 24, 2009, at 6:23 PM, Ryan May wrote: >> Ok, thanks. I've dug a little further, and it seems like the >> problem is that a >> column of all missing values ends up as a column of all None's. >> When you create >> a (masked) array from a list of None's, you end up with

Re: [Numpy-discussion] Bug with mafromtxt

2009-01-26 Thread Pierre GM
On Jan 24, 2009, at 6:23 PM, Ryan May wrote: >> > > Ok, thanks. I've dug a little further, and it seems like the > problem is that a > column of all missing values ends up as a column of all None's. > When you create > a (masked) array from a list of None's, you end up with an object > arr

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Alan G Isaac
On 1/26/2009 2:37 PM Pauli Virtanen apparently wrote: > Fixed, no need to be dissappointed any more. Thanks! Alan PS I hope "disappointed" did not sound so strong as to be discourteous. Email is tricky, and I tend to write mine with dangerous speed. _

Re: [Numpy-discussion] Usage of numpy.where and pylab.find with strings

2009-01-26 Thread Keith Goodman
On Mon, Jan 26, 2009 at 11:48 AM, Ariel Rokem wrote: > Hi - I am trying to find a string in a list with strings and have come > across the following state of affairs: > In [228]: subjects > Out[228]: > ['KAA', > 'CCS', > 'EJS', > 'MNM', > 'JHS', > 'LJL', > 'DVA', > 'FCL', > 'CNC', > 'KFM'

Re: [Numpy-discussion] Usage of numpy.where and pylab.find with strings

2009-01-26 Thread Robert Kern
On Mon, Jan 26, 2009 at 13:48, Ariel Rokem wrote: > Hi - I am trying to find a string in a list with strings and have come > across the following state of affairs: > In [228]: subjects > Out[228]: > ['KAA', > 'CCS', > 'EJS', > 'MNM', > 'JHS', > 'LJL', > 'DVA', > 'FCL', > 'CNC', > 'KFM', >

[Numpy-discussion] Usage of numpy.where and pylab.find with strings

2009-01-26 Thread Ariel Rokem
Hi - I am trying to find a string in a list with strings and have come across the following state of affairs: In [228]: subjects Out[228]: ['KAA', 'CCS', 'EJS', 'MNM', 'JHS', 'LJL', 'DVA', 'FCL', 'CNC', 'KFM', 'APM', 'GMC'] In [229]: subjects[0] Out[229]: 'KAA' In [230]: subjects[0

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Pauli Virtanen
Mon, 26 Jan 2009 14:10:46 -0500, Alan G Isaac wrote: > On 1/26/2009 12:48 PM Pierre GM apparently wrote: >> Shouldn't we refer to the new doc.scipy.org instead of Travis' site ? > > > Not in my opinion: Travis wrote a book, which is what is being cited. > > The docs link is in fact to the same

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Alan G Isaac
On 1/26/2009 12:48 PM Pierre GM apparently wrote: > Shouldn't we refer to the new doc.scipy.org instead of Travis' site ? Not in my opinion: Travis wrote a book, which is what is being cited. The docs link is in fact to the same tramy site. I must add that IMO, it would be a courtesy for the do

Re: [Numpy-discussion] Array of matrices - Inverse and dot

2009-01-26 Thread Tom K.
Jean-Baptiste Rudant wrote: > > I would like to operate in an easy and efficient way (without python loop) > with arrays of matrices. > > Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would > like to calculate inv_a and dot_ab, which would be arrays of N1*N2 > (3*3)-matrice

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Pierre GM
Alan, Awesome, thx! Now, what about the very last one ? > @MANUAL{oliphant-2006-guide, > author = {Oliphant, Travis E.}, > year = 2006, > title= {Guide to NumPy}, > month= mar, > address = {Provo, UT}, > institution = {Brigham Young University}, >

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Alan G Isaac
@MANUAL{ascher.dubois.hinsen.hugunin.oliphant-1999-np, author = {Ascher, David and Paul F. Dubois and Konrad Hinsen and James Hugunin and Travis Oliphant}, year = 1999, title= {Numerical Python}, edition = {UCRL-MA-128569}, address = {Livermore, CA},

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Pierre GM
JH, Thx for the links, but I'm afraid I need something more basic than that. For example, I'm referring to Python as: van Rossum, G. and Drake, F. L. (eds), 2006. Python Reference Manual, Python Software Foundation,. http://docs.python.org/ref/ref.html. I could indeed use http://www.scipy.org

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread Gael Varoquaux
On Mon, Jan 26, 2009 at 10:56:27AM -0500, j...@physics.ucf.edu wrote: > http://conference.scipy.org/proceedings/SciPy2008/index.html > It would be nice if someone involved in the proceedings could post a > bibtex on the citations page. You want a bibtex entry that would be for all the proceedings

Re: [Numpy-discussion] Academic citation ?

2009-01-26 Thread jh
> What is the most up-to-date way to cite Numpy and Scipy in an academic > journal ? Cite our conference articles here: http://conference.scipy.org/proceedings/SciPy2008/index.html It would be nice if someone involved in the proceedings could post a bibtex on the citations page. And link the

Re: [Numpy-discussion] Re : Array of matrices - Inverse and dot

2009-01-26 Thread josef . pktd
On Mon, Jan 26, 2009 at 10:25 AM, Jean-Baptiste Rudant wrote: > Thank you, but my example was bad. I have to deal with matrices which can be > 100*100. > > De : David Cournapeau > À : Discussion of Numerical Python > Envoyé le : Lundi, 26 Janvier 2009, 16h18mn 33

[Numpy-discussion] Re : Array of matrices - Inverse and dot

2009-01-26 Thread Jean-Baptiste Rudant
Thank you, but my example was bad. I have to deal with matrices which can be 100*100. De : David Cournapeau À : Discussion of Numerical Python Envoyé le : Lundi, 26 Janvier 2009, 16h18mn 33s Objet : Re: [Numpy-discussion] Array of matrices - Inverse and dot

Re: [Numpy-discussion] Array of matrices - Inverse and dot

2009-01-26 Thread David Cournapeau
On Mon, Jan 26, 2009 at 11:59 PM, Jean-Baptiste Rudant wrote: > Hello, > I would like to operate in an easy and efficient way (without python > loop) with arrays of matrices. > Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would like > to calculate inv_a and dot_ab, which would

[Numpy-discussion] Array of matrices - Inverse and dot

2009-01-26 Thread Jean-Baptiste Rudant
Hello, I would like to operate in an easy and efficient way (without python loop) with arrays of matrices. Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would like to calculate inv_a and dot_ab, which would be arrays of N1*N2 (3*3)-matrices, such as : inv_a[i, j] = np.lin

Re: [Numpy-discussion] List of Lists in C

2009-01-26 Thread Hanni Ali
Correct, however other areas of the application expect an empty list to be present, otherwise I would have used None. 2009/1/26 Matthieu Brucher > 2009/1/26 Hanni Ali : > > Yes fair point, but when it's a empty list and new elements are replaced > > with a new list instance it's fine, especially

Re: [Numpy-discussion] List of Lists in C

2009-01-26 Thread Matthieu Brucher
2009/1/26 Hanni Ali : > Yes fair point, but when it's a empty list and new elements are replaced > with a new list instance it's fine, especially as [[]]*10 is > significantly faster than [[] for i in xrange(10)] as I was previously > doing. In this case, why do you put a list in it in the

Re: [Numpy-discussion] List of Lists in C

2009-01-26 Thread Hanni Ali
Yes fair point, but when it's a empty list and new elements are replaced with a new list instance it's fine, especially as [[]]*10 is significantly faster than [[] for i in xrange(10)] as I was previously doing. In fact I think that's partly answered my question [[]]*x must create a list o

Re: [Numpy-discussion] List of Lists in C

2009-01-26 Thread Matthieu Brucher
Hi, Don't remember that you are using the same list in each element of the outer list. If you don't want this, use [[] for i in range(5)]. I don't think there is another way in C either (or too complicated). Matthieu 2009/1/26 Hanni Ali : > Hi, > > Quick question, I've been doing a fair bit of e

[Numpy-discussion] List of Lists in C

2009-01-26 Thread Hanni Ali
Hi, Quick question, I've been doing a fair bit of extension writing in C recently, but wondered how best to implement: >>> l = [[]] * 5 to create a list of a given length containing the initialization variable desired. A loop seems the straight forward manner, but I would have thought there was