[Numpy-discussion] recarray.__setattr__ bug?

2006-10-27 Thread Michael McNeil Forbes
Is the following the desired behaviour for setting recarray attributes?  This seems to clash with the semantics for arrays.  >>> from numpy import *  >>> a = array([1,2,3])  >>> b = a.view([('x',int),('y',int),('z',int)])  >>> r = b.view(recarray)  >>> b['x'] = 0  >>> r.y = 0  >>> a  array([0, 2,

[Numpy-discussion] NumPy on Intel C/MKL

2006-10-27 Thread Albert Strasheim
Hello all I managed to get NumPy to compile with the free for non-commercial use Linux versions of the Intel C compiler, version 9.1 and Intel MKL 8.1. Instructions at the bottom of this page: http://www.scipy.org/Installing_SciPy/Linux I ran the NumPy test suite, and it turned up a few test fai

Re: [Numpy-discussion] adding an attribute to an nd-array

2006-10-27 Thread Albert Strasheim
Hello all > -Original Message- > From: [EMAIL PROTECTED] [mailto:numpy- > [EMAIL PROTECTED] On Behalf Of Travis Oliphant > Sent: Thursday, October 19, 2006 5:45 PM > To: Discussion of Numerical Python > Subject: Re: [Numpy-discussion] adding an attribute to an nd-array > > Stefan van der

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread Robert Kern
Sven Schreiber wrote: > IIRC, if the eigenvalues returned by numpy are real numbers (due to the > type of the underlying matrix and algorithm), then they are > automatically returned ascending (again, IIRC). This should be considered an implementation detail that may change in the future, so don

Re: [Numpy-discussion] Defining custom types

2006-10-27 Thread Jonathan Wang
On 10/27/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Jonathan Wang wrote:> On 10/27/06, *Travis Oliphant* <[EMAIL PROTECTED]> [EMAIL PROTECTED] >> wrote:>> > If I redefine the string function, I encounter another, perhaps more> > serious problem leading to a segfault. I've defined my str

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread Sven Schreiber
jeremito schrieb: > argsort() will do the trick. Thanks once again. > Jeremy > I was a bit confused by your question, maybe you can clarify what you did in the end. IIRC, if the eigenvalues returned by numpy are real numbers (due to the type of the underlying matrix and algorithm), then they

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread jeremito
argsort() will do the trick. Thanks once again. Jeremy - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM

Re: [Numpy-discussion] Defining custom types

2006-10-27 Thread Travis Oliphant
Jonathan Wang wrote: > On 10/27/06, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > > If I redefine the string function, I encounter another, perhaps more > > serious problem leading to a segfault. I've defined my string > function > > to be extremely

Re: [Numpy-discussion] Defining custom types

2006-10-27 Thread Jonathan Wang
On 10/27/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > If I redefine the string function, I encounter another, perhaps more> serious problem leading to a segfault. I've defined my string function> to be extremely simple:> >>> def printer(arr): > ...   return str(arr[0])>> Now, if I try to print

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread Christopher Barker
> David Cournapeau wrote: >> Hi, >>I announce the first release of pyaudio, a module to make noise from >> numpy arrays (read, write and play audio files with numpy arrays). Does this have anything to do with this pyaudio? http://people.csail.mit.edu/hubert/pyaudio/ -Chris -- Christophe

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread pearu
On Fri, 27 Oct 2006, Travis Oliphant wrote: > David Cournapeau wrote: > > Hi, > >I announce the first release of pyaudio, a module to make noise from > > numpy arrays (read, write and play audio files with numpy arrays). > > > > Very nice. Thank you. I'd like to see exactly this kind

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread Travis Oliphant
David Cournapeau wrote: > Hi, >I announce the first release of pyaudio, a module to make noise from > numpy arrays (read, write and play audio files with numpy arrays). > Very nice. Thank you. I'd like to see exactly this kind of thing for video files too. We can get a lot of mileage

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread Fernando Perez
On 10/27/06, David L. Goldsmith <[EMAIL PROTECTED]> wrote: > I'm sure some others _might_ regard this as frivolous, so let me just > say: "Way Cool"! Thanks! +1, and not frivolous at all. It's /really/ neat to be able to pull in data from standard image formats (say jpeg) into arrays to quickly

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread Robert Kern
jeremito wrote: > I am using a = numpy.linalg.eig(A) to get the eigenvalues and > eigenvectors. I am interested only in the largest eigenvalue so I > would like to sort the first element of a. But if I do that, I won't > know what is the associated eigenvector. Is there a function that will > so

Re: [Numpy-discussion] dtype() examples that used to work

2006-10-27 Thread Travis Oliphant
Joris De Ridder wrote: > Hi, > > The following did once work in NumPy: > > dtype([int16]) dtype([[int16]]) dtype([uint,int32]) dtype(['f8','S10']) > > but now they all generate a "TypeError: data type not understood". Why? > I could not find the answer in help(d

Re: [Numpy-discussion] numpy-1.0 regress failure on OpenBSD

2006-10-27 Thread Damien Miller
On Thu, 26 Oct 2006, Travis Oliphant wrote: > Unless you want to help with tracking how long double is interpreted on > several platforms, then just ignore the test. (It actually wasn't being > run in 1.0b1). I'm happy to help - do you have a testcase that I can run on the various platforms th

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread David L. Goldsmith
I'm sure some others _might_ regard this as frivolous, so let me just say: "Way Cool"! Thanks! DG David Cournapeau wrote: > Hi, >I announce the first release of pyaudio, a module to make noise from > numpy arrays (read, write and play audio files with numpy arrays). > > * WHAT FOR ?: > >

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread Keith Goodman
On 10/27/06, jeremito <[EMAIL PROTECTED]> wrote: > I am using a = numpy.linalg.eig(A) to get the eigenvalues and > eigenvectors. I am interested only in the largest eigenvalue so I > would like to sort the first element of a. But if I do that, I won't > know what is the associated eigenvector. I

Re: [Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread A. M. Archibald
On 27/10/06, jeremito <[EMAIL PROTECTED]> wrote: > I am using a = numpy.linalg.eig(A) to get the eigenvalues and > eigenvectors. I am interested only in the largest eigenvalue so I > would like to sort the first element of a. But if I do that, I won't > know what is the associated eigenvector. I

[Numpy-discussion] Sorting eigenvalues and vectors together

2006-10-27 Thread jeremito
I am using a = numpy.linalg.eig(A) to get the eigenvalues and eigenvectors. I am interested only in the largest eigenvalue so I would like to sort the first element of a. But if I do that, I won't know what is the associated eigenvector. Is there a function that will sort the values and vectors

Re: [Numpy-discussion] dtype() examples that used to work

2006-10-27 Thread Francesc Altet
A Divendres 27 Octubre 2006 18:13, Joris De Ridder va escriure: > Hi, > > The following did once work in NumPy: > >>> dtype([int16]) > >>> dtype([[int16]]) > >>> dtype([uint,int32]) > >>> dtype(['f8','S10']) > > but now they all generate a "TypeError: data type not understood". Why? Should be inte

Re: [Numpy-discussion] astype() behaviour

2006-10-27 Thread Francesc Altet
A Divendres 27 Octubre 2006 17:58, Joris De Ridder va escriure: > Hi, > > Is the following behaviour of astype() intentional in NumPy 1.0? > > >>> x = array([1,2,3]) > >>> x.astype(None) > > array([ 1., 2., 3.]) > > That is, the int32 is converted to float64. Yes, I think the behaviour is intend

Re: [Numpy-discussion] Python Enhancement Proposal (PEP) - Current status?

2006-10-27 Thread Travis Oliphant
Christopher Barker wrote: > Travis Oliphant wrote: > >> I'm working on two PEP's after discussing this with Guido at SciPy 2006. >> >> 1) A data-type object PEP >> 2) An extension of the buffer protocol to include the array interface. >> >> These are being done instead of the basearray PEP for

Re: [Numpy-discussion] Python Enhancement Proposal (PEP) - Current status?

2006-10-27 Thread Christopher Barker
Travis Oliphant wrote: > I'm working on two PEP's after discussing this with Guido at SciPy 2006. > > 1) A data-type object PEP > 2) An extension of the buffer protocol to include the array interface. > > These are being done instead of the basearray PEP for now. Those are a great starts, and

[Numpy-discussion] dtype() examples that used to work

2006-10-27 Thread Joris De Ridder
Hi, The following did once work in NumPy: >>> dtype([int16]) >>> dtype([[int16]]) >>> dtype([uint,int32]) >>> dtype(['f8','S10']) but now they all generate a "TypeError: data type not understood". Why? I could not find the answer in help(dtype), the RecordArrays tutorial on scipy.org, the NumPy

[Numpy-discussion] astype() behaviour

2006-10-27 Thread Joris De Ridder
Hi, Is the following behaviour of astype() intentional in NumPy 1.0? >>> x = array([1,2,3]) >>> x.astype(None) array([ 1., 2., 3.]) That is, the int32 is converted to float64. J. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm -

Re: [Numpy-discussion] Python Enhancement Proposal (PEP) - Current status?

2006-10-27 Thread Colin J. Williams
Travis Oliphant wrote: > Colin J. Williams wrote: > >> A July posting sets out the intent: >> http://scipy.org/BaseArray >> Version 3 of the draft: >> http://numpy.scipy.org/array_interface.shtml >> There is a description, from a C Structure perspective: >> http://svn.scipy.org/svn/PEP/PEP_bas

Re: [Numpy-discussion] Defining custom types

2006-10-27 Thread Travis Oliphant
Jonathan Wang wrote: > On 10/26/06, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > > Okay, is my understanding here correct? I am defining two type > > descriptors: > > PyArray_Descr mxNumpyType - describes the Numpy array type. > > PyTypeObject mxNum

Re: [Numpy-discussion] Python Enhancement Proposal (PEP) - Current status?

2006-10-27 Thread Travis Oliphant
Colin J. Williams wrote: > A July posting sets out the intent: > http://scipy.org/BaseArray > Version 3 of the draft: > http://numpy.scipy.org/array_interface.shtml > There is a description, from a C Structure perspective: > http://svn.scipy.org/svn/PEP/PEP_basearray.txt > > What is the current sta

[Numpy-discussion] Python Enhancement Proposal (PEP) - Current status?

2006-10-27 Thread Colin J. Williams
A July posting sets out the intent: http://scipy.org/BaseArray Version 3 of the draft: http://numpy.scipy.org/array_interface.shtml There is a description, from a C Structure perspective: http://svn.scipy.org/svn/PEP/PEP_basearray.txt What is the current status of the plan to develop a PEP? Is th

Re: [Numpy-discussion] Defining custom types

2006-10-27 Thread Jonathan Wang
On 10/26/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Okay, is my understanding here correct? I am defining two type > descriptors:> PyArray_Descr mxNumpyType - describes the Numpy array type.> PyTypeObject mxNumpyDataType - describes the data type of the contents> of the array (i.e. mxNumpyTyp

Re: [Numpy-discussion] Matrices for testing

2006-10-27 Thread jeremito
> Well if all you want is some matrices, there's nothing stopping you > from grabbing the matrices in the LAPACK distribution and using them > yourself. Robert's just saying they won't be included in Numpy. > There's also the matrix market, whcih has a large number of > (sparse-only?) example mat

Re: [Numpy-discussion] Changes to bools under Numexpr

2006-10-27 Thread Colin J. Williams
Ivan Vilata i Balaguer wrote: > En/na Colin J. Williams ha escrit: > > >> Ivan Vilata i Balaguer wrote: >> >>> Hi all. The attached diff makes some changes to Numexpr support for >>> booleans. The changes and their rationale are below. >>> >>> 1. New ``True`` and ``False`` boolean const

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-27 Thread Lars Friedrich
Hello Gael (sorry, I just don't get the dots...), Am Freitag, den 27.10.2006, 08:46 +0200 schrieb Gael Varoquaux: > Worked great for me ! My approach was to write a small wrapper C > (actually C++, with "extern C" linking) library that exposed only what I > needed of the camera interface, in a "py

[Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread David Cournapeau
Hi, I announce the first release of pyaudio, a module to make noise from numpy arrays (read, write and play audio files with numpy arrays). * WHAT FOR ?: The Goal is to give to a numpy/scipy environmenet some basic audio IO facilities (ala sound, wavread, wavwrite of matlab). With pya

Re: [Numpy-discussion] [ANN] NumPy 1.0 release

2006-10-27 Thread Ivan Vilata i Balaguer
En/na Travis E. Oliphant ha escrit:: > We are very pleased to announce the release of NumPy 1.0 available for > download at http://www.numpy.org > > This release is the culmination of over 18 months of effort to allow > unification of the Numeric and Numarray communities. [...] Wow, let me sa

Re: [Numpy-discussion] build errors Solaris x86 64 bit python2.5

2006-10-27 Thread Charles R Harris
On 10/26/06, Charles R Harris <[EMAIL PROTECTED]> wrote: On 10/26/06, Mathew Yeates < [EMAIL PROTECTED]> wrote: yes, I got around the problem from my previous posting "distutilsquestion". I added ld_args[:0] = ['-m64'] to line 209 ofpython2.5/distutils/unixcompiler.py. Lovely, yes I know.I now get

Re: [Numpy-discussion] Changes to bools under Numexpr

2006-10-27 Thread Ivan Vilata i Balaguer
En/na Colin J. Williams ha escrit: > Ivan Vilata i Balaguer wrote: >> Hi all. The attached diff makes some changes to Numexpr support for >> booleans. The changes and their rationale are below. >> >> 1. New ``True`` and ``False`` boolean constants. This is so that 1 and >>0 are always prope