Re: [Numpy-discussion] NumPy in Teaching

2007-03-03 Thread Les Schaffer
Joe Harrington wrote: > My syllabi (there are undergrad and grad versions) are at: > > Cornell courses (undergrad only): > http://physics.ucf.edu/~jh/ast/ast234-2003/ > http://physics.ucf.edu/~jh/ast/ast234-2004/ > > File not found Les Schaffer

[Numpy-discussion] pretty print array

2007-03-03 Thread John Hunter
I have a numpy array of floats, and would like an easy way of specifying the format string when printing the array, eg print x.pprint('%1.3f') would do the normal repr of the array but using my format string for the individual elements. Is there and easy way to get something like this currently?

Re: [Numpy-discussion] Buffer PEP in NumPy SVN

2007-03-03 Thread Steven H. Rogers
Travis Oliphant wrote: > I just wanted to point people to the online version of the PEP. I'm > still looking for comments and suggestions. The current version is here: > > http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/doc/pep_buffer.txt > > -Travis > Hi Travis: Have you contacte

Re: [Numpy-discussion] [numpy] argmin in multidimensional arrays

2007-03-03 Thread Glen W. Mabey
On Thu, 06 Jul 2006 04:59:22 -0600, Travis wrote: > Subject: numpy : argmin in multidimensional arrays > > TG wrote: > > Hi there. > > > > I am working with multi-dimensional arrays and I need to get > > coordinates of the min value in it. > > > > using myarray.argmin() returns the index in the

Re: [Numpy-discussion] [numpy] argmin in multidimensional arrays

2007-03-03 Thread Robert Kern
Glen W. Mabey wrote: > Does anyone else find this behavior counter-intuitive? > > It seems to me that one of the great design features of numpy is the > n-dim generality it provides, and argmin is one function in this breaks > down, IMHO. Not at all. It consistently applies the simple rule: if

Re: [Numpy-discussion] Buffer PEP in NumPy SVN

2007-03-03 Thread Steven H. Rogers
Steven H. Rogers wrote: > Travis Oliphant wrote: > >> I just wanted to point people to the online version of the PEP. I'm >> still looking for comments and suggestions. The current version is here: >> >> http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/doc/pep_buffer.txt >> >> -Trav

Re: [Numpy-discussion] Buffer PEP in NumPy SVN

2007-03-03 Thread Torgil Svensson
Impressive work and an very intresting approach. I have yet to figure out pros/cons or the variety of options this will give when writing applications/modules. Big plus for giving ctypes a way out of their crappy struct definitions. A few quick questions: Is the concept here that items always a

Re: [Numpy-discussion] [numpy] argmin in multidimensional arrays

2007-03-03 Thread Glen W. Mabey
On Sat, Mar 03, 2007 at 03:09:35PM -0600, Robert Kern wrote: > Glen W. Mabey wrote: > > Does anyone else find this behavior counter-intuitive? > > > > It seems to me that one of the great design features of numpy is the > > n-dim generality it provides, and argmin is one function in this breaks

[Numpy-discussion] First Numerical Python code...comments?

2007-03-03 Thread Tyler Hayes
Hello All: Well, I recently made the switch to Python for scientific computing (using NumPy and Matplotlib/PyLab) and got my first program to work. It is a simple 1D finite element code for a tightly stretched wire and is a textbook example. To solve it, I also created a symmetric, banded matrix

Re: [Numpy-discussion] First Numerical Python code...comments?

2007-03-03 Thread Francesc Altet
Hi Tyler, I'll try to give you some advices on your style but I won't comment on whether you can substitute some loops by 'more intelligent' operations (other people more savvy than me in these issues can respond better). El ds 03 de 03 del 2007 a les 18:05 -0500, en/na Tyler Hayes va escriure: >