Re: [Numpy-discussion] Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Travis Oliphant
Dr. Seth Olsen wrote: > > Hi Bill, > > MMTK has not made the conversion over to the new numpy module. It is > built against the old Numeric code, and the word from its developers > is that changing to numpy cannot be a priority now. > My suggestion is to *kindly* put pressure on them. I've spe

Re: [Numpy-discussion] max argmax combo

2006-09-18 Thread Charles R Harris
On 9/18/06, Charles R Harris <[EMAIL PROTECTED]> wrote: On 9/18/06, Bill Baxter < [EMAIL PROTECTED]> wrote: On 9/19/06, Charles R Harris <[EMAIL PROTECTED]> wrote:> On 9/18/06, Bill Baxter < [EMAIL PROTECTED]> wrote: > > I find myself often wanting both the max and the argmax of an array.> > (And s

Re: [Numpy-discussion] ***[Possible UCE]*** Re: Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Travis Oliphant
Dr. Seth Olsen wrote: > > Hi MMTKers and NUMPYers, > > Bill's answer to my inquiry about the problem I'm having with > Collection.findTransformation() (and also, incidentally, with the > dgesvd call in Subspace.getBasis(), has convinced me that I can no > long use MMTK without changing some of t

Re: [Numpy-discussion] max argmax combo

2006-09-18 Thread Charles R Harris
On 9/18/06, Bill Baxter <[EMAIL PROTECTED]> wrote: On 9/19/06, Charles R Harris <[EMAIL PROTECTED]> wrote:> On 9/18/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > > I find myself often wanting both the max and the argmax of an array.> > (And same for the other arg* functions)> > You have to do someth

Re: [Numpy-discussion] max argmax combo

2006-09-18 Thread Bill Baxter
On 9/19/06, Charles R Harris <[EMAIL PROTECTED]> wrote: > On 9/18/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > > I find myself often wanting both the max and the argmax of an array. > > (And same for the other arg* functions) > > You have to do something like > > a = rand(10,5) > > imax =

Re: [Numpy-discussion] Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Dr. Seth Olsen
Hi MMTKers and NUMPYers,Bill's answer to my inquiry about the problem I'm having with Collection.findTransformation() (and also, incidentally, with the dgesvd call in Subspace.getBasis(), has convinced me that I can no long use MMTK without changing some of the code over to numpy.  I have already b

Re: [Numpy-discussion] max argmax combo

2006-09-18 Thread Charles R Harris
On 9/18/06, Bill Baxter <[EMAIL PROTECTED]> wrote: I find myself often wanting both the max and the argmax of an array.(And same for the other arg* functions)Of course I can do argmax first then use fancy indexing to get the max as well.But the result of argmax isn't really in a format that's readi

[Numpy-discussion] max argmax combo

2006-09-18 Thread Bill Baxter
I find myself often wanting both the max and the argmax of an array. (And same for the other arg* functions) Of course I can do argmax first then use fancy indexing to get the max as well. But the result of argmax isn't really in a format that's readily usable as an index. You have to do something

Re: [Numpy-discussion] unique1d: renaming retindx to return_index

2006-09-18 Thread Bill Baxter
Grepping through numpy/**/*.py, the only three functions I could find with an argument to specify extra return values are: linspace(start, stop, num=50, endpoint=True, retstep=False) average(a, axis=None weights=None, returned=False) unique1d(ar1, retindx=False) If unique1d is going to chan

Re: [Numpy-discussion] Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Dr. Seth Olsen
Hi Bill,MMTK has not made the conversion over to the new numpy module.  It is built against the old Numeric code, and the word from its developers is that changing to numpy cannot be a priority now.Cheers, SethOn 9/19/06, Bill Baxter <[EMAIL PROTECTED]> wrote: Hey there,I don't see anything called

Re: [Numpy-discussion] Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Bill Baxter
Hey there, I don't see anything called "LinearAlgegra.eigenvectors()". Do you maybe mean numpy.linalg.eig? Which version of numpy are you using? The latest release is 1.0b5. >>> import numpy >>> numpy.__version__ '1.0b5' >>> numpy.linalg.eig([[2,1],[1,2]]) (array([ 3., 1.]), array([[ 0.7071067

[Numpy-discussion] Fwd: Collection.findTransformation() never stops

2006-09-18 Thread Dr. Seth Olsen
Hi Numpyers,I recently sent the message below to the MMTK mailing list, but it's really a problem with LinearAlgebra.py.  The routine LinearAlgebra.eigenvectors() never stops, even when I try to diagonalize a very simple 2x2 matrix.  I've tried this on two machines with completely standard FC4 and

[Numpy-discussion] unique1d: renaming retindx to return_index

2006-09-18 Thread Stefan van der Walt
Hi, Would anyone object if I changed the signature of unique1d(ar1, retindx=False) to unique1d(ar1, return_index=False)? I find retindx both harder to read and to type than return_index. Thanks. Stéfan - Take Surveys. Ea

Re: [Numpy-discussion] record descriptors: trailing unused bytes

2006-09-18 Thread Martin Wiechert
On Monday 18 September 2006 20:46, Travis Oliphant wrote: > Martin Wiechert wrote: > > Hi list, > > > > does anybody know, if in C in the PyArray_Descr struct it is safe to > > manually change descr->elsize and descr->alignment as long as these are > > compatible and descr->elsize is large enough t

Re: [Numpy-discussion] visual programming

2006-09-18 Thread Bryan Cole
On Mon, 2006-09-18 at 09:29 -0700, Mathew Yeates wrote: > semi off topic. > Does anyone know of any good visual programming tools? Forever ago, I > used to use something called Khoros for image processing and I found it > very useful. You connect boxes which represent different processing > step

Re: [Numpy-discussion] Segfault on byteswap() on recarrays

2006-09-18 Thread Travis Oliphant
Matthew Brett wrote: > Hi, > > I noticed this works: > > In [5]:a = array((1,), dtype=[('one', ' > In [6]:a.byteswap() > Out[6]: > array((16777216,), > dtype=[('one', ' > But, extending the recarray leads to a segfault on byteswapping: > > In [8]:a = array((1, 2), dtype=[('one', ' > In [9]:a.

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Sven Schreiber
Christopher Barker schrieb: > Sven Schreiber wrote: >> on my 1.0b5 I also see this docstring which indeed seems obsolete. > > I get this docs string from : > > >>> import numpy as N > >>> N.__version__ > '1.0b5' > >>> a = N.arange(10) > >>> help( a.sum) > > """ > sum(...) > a.sum(axis=N

[Numpy-discussion] static build

2006-09-18 Thread Mike Rovner
I need build core numpy (plus possible dft) static into python.a Can someone point me to the right direction. Currently I built some libs but blocked on _internal. From my Setup.local: NPSRC=/home/mrovner/src/numpy-0.9.8 NPBLD=$(NPSRC)/build/src.linux-i686-2.4 NPINC=-I$(NPSRC)/numpy/core/includ

[Numpy-discussion] Segfault on byteswap() on recarrays

2006-09-18 Thread Matthew Brett
Hi, I noticed this works: In [5]:a = array((1,), dtype=[('one', 'http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listi

Re: [Numpy-discussion] 1.0b5 Installation on OS X

2006-09-18 Thread Christopher Barker
David Andrews wrote: > I'm unable to install the 1.0b5 release from the .mpkg on OS X - when > it comes to the two checkboxes to select the platlib and the scripts, > both are greyed out. The installer then claims 'Cannot continue: > Nothing to install'. hmmm. It works just fine for me -- just c

Re: [Numpy-discussion] Changing byte ordering with astype fails with 0d arrays

2006-09-18 Thread Travis Oliphant
Matthew Brett wrote: > Hi, > > As expected: > > In [67]:a = array([1], dtype=' > In [68]:a.astype('>i4').dtype > Out[68]:dtype('>i4') > > I was also expecting this to work for 0d arrays, but it doesn't: > > In [69]:a = array(1, dtype=' > In [70]:a.astype('>i4').dtype > Out[70]:dtype(' > The prob

Re: [Numpy-discussion] feasability study to migrate from numarray to numpy

2006-09-18 Thread Travis Oliphant
mg wrote: > Hi all, > > I am doing a feseability study to migrate our Python based FEM > applications from Numarray to Numpy. > > First, I tried to install Numpy from Python-2.4 on linux-x86, > linux-86-64bit. So, all work fine. Great! Moreover, I change easily the > BLAS linked libraries. I tri

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Travis Oliphant
Eric Emsellem wrote: > Hi again > > after some hours of debugging I finally (I think) found the problem: > > numpy.sum([[0,1,2],[2,3,4]]) > 24 > > numpy.sum([[0,1,2],[2,3,4]],axis=0) > array([2, 4, 6]) > > numpy.sum([[0,1,2],[2,3,4]],axis=1) > array([3, 9]) > > > Isn't the first line supposed to ac

[Numpy-discussion] Changing byte ordering with astype fails with 0d arrays

2006-09-18 Thread Matthew Brett
Hi, As expected: In [67]:a = array([1], dtype='i4').dtype Out[68]:dtype('>i4') I was also expecting this to work for 0d arrays, but it doesn't: In [69]:a = array(1, dtype='i4').dtype Out[70]:dtype('http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___

Re: [Numpy-discussion] record descriptors: trailing unused bytes

2006-09-18 Thread Travis Oliphant
Martin Wiechert wrote: > Hi list, > > does anybody know, if in C in the PyArray_Descr struct it is safe to manually > change descr->elsize and descr->alignment as long as these are compatible and > descr->elsize is large enough to hold all fields? Of course I mean before any > array is construct

Re: [Numpy-discussion] visual programming

2006-09-18 Thread Charles R Harris
On 9/18/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: semi off topic.Does anyone know of any good visual programming tools? Forever ago, Iused to use something called Khoros for image processing and I found itvery useful. You connect boxes which represent different processing steps. At about the sam

Re: [Numpy-discussion] visual programming

2006-09-18 Thread A. M. Archibald
On 18/09/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: > semi off topic. > Does anyone know of any good visual programming tools? Forever ago, I > used to use something called Khoros for image processing and I found it > very useful. You connect boxes which represent different processing > steps. At

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Christopher Barker
Sven Schreiber wrote: > on my 1.0b5 I also see this docstring which indeed seems obsolete. I get this docs string from : >>> import numpy as N >>> N.__version__ '1.0b5' >>> a = N.arange(10) >>> help( a.sum) """ sum(...) a.sum(axis=None, dtype=None) -> Sum of array over given axis.

Re: [Numpy-discussion] visual programming

2006-09-18 Thread Les Schaffer
Mathew Yeates wrote: > semi off topic. > Does anyone know of any good visual programming tools? Forever ago, I > used to use something called Khoros for image processing and I found it > very useful. You connect boxes which represent different processing > steps. > if i recall correctly, th

[Numpy-discussion] feasability study to migrate from numarray to numpy

2006-09-18 Thread mg
Hi all, I am doing a feseability study to migrate our Python based FEM applications from Numarray to Numpy. First, I tried to install Numpy from Python-2.4 on linux-x86, linux-86-64bit. So, all work fine. Great! Moreover, I change easily the BLAS linked libraries. I tried with ATLAS and GOTO.

[Numpy-discussion] visual programming

2006-09-18 Thread Mathew Yeates
semi off topic. Does anyone know of any good visual programming tools? Forever ago, I used to use something called Khoros for image processing and I found it very useful. You connect boxes which represent different processing steps. At about the same time, there was something similar to Khoros

Re: [Numpy-discussion] recarray

2006-09-18 Thread Lionel Roubeyrie
Le lundi 18 septembre 2006 17:40, Francesc Altet a écrit : > I'm running NumPy 1.0b5. Please, check that you are using a recent > version of it. > > Cheers, Arg, sorry, version here was 0.9, an upgrade and it works fine. thanks again -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.lima

Re: [Numpy-discussion] recarray

2006-09-18 Thread Francesc Altet
El dl 18 de 09 del 2006 a les 17:10 +0200, en/na Lionel Roubeyrie va escriure: > Le lundi 18 septembre 2006 12:17, Francesc Altet a écrit : > > You have two problems here. The first is that you shouldn't have missign > > entries, or conversion from empty strings to ints (or whatever) will > > > > f

Re: [Numpy-discussion] recarray

2006-09-18 Thread Lionel Roubeyrie
Le lundi 18 septembre 2006 12:17, Francesc Altet a écrit : > You have two problems here. The first is that you shouldn't have missign > entries, or conversion from empty strings to ints (or whatever) will > > fail: > >>> int('') > > Traceback (most recent call last): > File "", line 1, in ? > Val

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Sven Schreiber
Eric Emsellem schrieb: > Hi again > > after some hours of debugging I finally (I think) found the problem: > > numpy.sum([[0,1,2],[2,3,4]]) > 24 > > numpy.sum([[0,1,2],[2,3,4]],axis=0) > array([2, 4, 6]) > > numpy.sum([[0,1,2],[2,3,4]],axis=1) > array([3, 9]) > > > Isn't the first line suppos

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Albert Strasheim
Hey Eric > Hi again > > after some hours of debugging I finally (I think) found the problem: > > numpy.sum([[0,1,2],[2,3,4]]) > 24 > > numpy.sum([[0,1,2],[2,3,4]],axis=0) > array([2, 4, 6]) > > numpy.sum([[0,1,2],[2,3,4]],axis=1) > array([3, 9]) > > > Isn't the first line supposed to act as w

Re: [Numpy-discussion] recarray

2006-09-18 Thread Francesc Altet
El dl 18 de 09 del 2006 a les 09:38 +0200, en/na Lionel Roubeyrie va escriure: > Le vendredi 15 septembre 2006 16:05, Francesc Altet a écrit : > > Another possibility is to play with columns directly from the initial > > recarray. The next is an example: > > > > In [101]: ra=numpy.rec.array("1"*36,

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?

2006-09-18 Thread Eric Emsellem
Hi again after some hours of debugging I finally (I think) found the problem: numpy.sum([[0,1,2],[2,3,4]]) 24 numpy.sum([[0,1,2],[2,3,4]],axis=0) array([2, 4, 6]) numpy.sum([[0,1,2],[2,3,4]],axis=1) array([3, 9]) Isn't the first line supposed to act as with "axis=0" by default (see help numpy

Re: [Numpy-discussion] recarray

2006-09-18 Thread Lionel Roubeyrie
Le vendredi 15 septembre 2006 16:05, Francesc Altet a écrit : > Another possibility is to play with columns directly from the initial > recarray. The next is an example: > > In [101]: ra=numpy.rec.array("1"*36, dtype="a4,i4,f4", shape=3) > In [102]: ra > Out[102]: > recarray([('', 825307441, 2.