Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Nadav Horesh
Beside proper programing paradigm Python easily scales to large-scale number crunching: You can run large-matrices calculations with about 1/2 to 1/4 of memory consumption comparing to Matlab. It is not difficult to construct a program that run over several computers (independent of the hardwa

[Numpy-discussion] sort bug

2007-04-25 Thread Anton Sherwood
This code -- adj = [ [eval(y) for y in x.split()] for x in infile ] val,vec = numpy.linalg.eig(adj) master = zip( val, vec.transpose() ) master.sort() *sometimes* gives this error: Traceback (most recent call last): File "3work.py", line 14, in

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Charles R Harris
On 4/25/07, Anne Archibald <[EMAIL PROTECTED]> wrote: On 25/04/07, Sturla Molden <[EMAIL PROTECTED]> wrote: > You have to realize that Matlab is mainly used by people who are not > skilled programmers but scientists and engineers, the majority of which > have never used anything else except per

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Anne Archibald
On 25/04/07, Sturla Molden <[EMAIL PROTECTED]> wrote: > You have to realize that Matlab is mainly used by people who are not > skilled programmers but scientists and engineers, the majority of which > have never used anything else except perhaps Fortran 77. An array is the > most advanced data str

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread David Cournapeau
Brian Blais wrote: > Christopher Barker wrote: >> Sturla Molden wrote: >>> It is >>> also easier to write C or Fortran extensions for Matlab than for Python. >> Really? I"m not so sure about that -- I found mex file writing pretty >> painful. >> >> With weave, boost, pyrex, swig, f2py, etc, the h

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Brian Blais
Christopher Barker wrote: > Sturla Molden wrote: >> It is >> also easier to write C or Fortran extensions for Matlab than for Python. > > Really? I"m not so sure about that -- I found mex file writing pretty > painful. > > With weave, boost, pyrex, swig, f2py, etc, the hardest thing about > wr

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Ryan Krauss
My CiSE article can be downloaded from here: http://www.siue.edu/~rkrauss/python_stuff.html Ryan On 4/25/07, John Hunter <[EMAIL PROTECTED]> wrote: > On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > > Since authors are allowed by their publication policy to keep a > > publicly available c

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread belinda thom
On Apr 25, 2007, at 12:46 PM, Bill Baxter wrote: > On 4/26/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Sturla Molden wrote: >>> On 4/25/2007 8:34 PM, Robert Kern wrote: >>> The things that I get annoyed with every time I have to read some Matlab code are the lack of namespaces

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread belinda thom
I used to use them frequently. --b On Apr 25, 2007, at 12:31 PM, Robert Kern wrote: > Sturla Molden wrote: >> On 4/25/2007 8:34 PM, Robert Kern wrote: >> >>> The things that I get annoyed with every time I have to read some >>> Matlab code >>> are the lack of namespaces and first-class functio

Re: [Numpy-discussion] Questions about converting to numpy

2007-04-25 Thread Robert Kern
Christopher Barker wrote: > I can only help with one: >> - Even after reading the book I'm not really clear on why one would use >> numpy.float_ instead of numpy.float or float > > They float and numpy.float are the same, and numpy.float_ is the same as > numpy.float64: > > >>> import numpy >

Re: [Numpy-discussion] Questions about converting to numpy

2007-04-25 Thread Christopher Barker
Russell E. Owen wrote: > So I finally bit the bullet and converted most of my code from Numeric > and numarray to numpy. good for you! I can only help with one: > - Even after reading the book I'm not really clear on why one would use > numpy.float_ instead of numpy.float or float They float a

Re: [Numpy-discussion] Questions about converting to numpy

2007-04-25 Thread Robert Kern
Russell E. Owen wrote: > So I finally bit the bullet and converted most of my code from Numeric > and numarray to numpy. (I haven't yet tried to convert one package that > makes heavy use of nd_image and has C extensions). > > But it left me with a few questions: > > - What exception does numpy

[Numpy-discussion] Questions about converting to numpy

2007-04-25 Thread Russell E. Owen
So I finally bit the bullet and converted most of my code from Numeric and numarray to numpy. (I haven't yet tried to convert one package that makes heavy use of nd_image and has C extensions). But it left me with a few questions: - What exception does numpy throw if it runs out of memory? (I c

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Sturla Molden
On 4/25/2007 9:31 PM, Robert Kern wrote: >>> The things that I get annoyed with every time I have to read some Matlab >>> code >>> are the lack of namespaces and first-class function objects. >> Matlab does have first-class function objects. You can get a handle to >> any function using the @ op

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Bill Baxter
On 4/26/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Sturla Molden wrote: > > On 4/25/2007 8:34 PM, Robert Kern wrote: > > > >> The things that I get annoyed with every time I have to read some Matlab > >> code > >> are the lack of namespaces and first-class function objects. > > > > Matlab does h

Re: [Numpy-discussion] Oddity with numpy.int64 integer division

2007-04-25 Thread Warren Focke
On futher contemplation, and hearing others' arguments, I'm changing my vote. Make it compatible with python. w On Tue, 24 Apr 2007, Warren Focke wrote: > > > On Tue, 24 Apr 2007, Timothy Hochberg wrote: > > > On 4/24/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > > > > > Christian Marquardt wr

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Christopher Barker
Sturla Molden wrote: > It is > also easier to write C or Fortran extensions for Matlab than for Python. Really? I"m not so sure about that -- I found mex file writing pretty painful. With weave, boost, pyrex, swig, f2py, etc, the hardest thing about writing extensions for Python is choosing wh

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Robert Kern
Sturla Molden wrote: > On 4/25/2007 8:34 PM, Robert Kern wrote: > >> The things that I get annoyed with every time I have to read some Matlab code >> are the lack of namespaces and first-class function objects. > > Matlab does have first-class function objects. You can get a handle to > any func

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Sturla Molden
On 4/25/2007 8:34 PM, Robert Kern wrote: > The things that I get annoyed with every time I have to read some Matlab code > are the lack of namespaces and first-class function objects. Matlab does have first-class function objects. You can get a handle to any function using the @ operator. Matlab

Re: [Numpy-discussion] numpy migration

2007-04-25 Thread Duncan Smith
Timothy Hochberg wrote: > On 4/24/07, Duncan Smith <[EMAIL PROTECTED]> wrote: > >> >> >> >> Timothy Hochberg wrote: > > > > [SNIP] > > >> >> > >> > You should be getting a warning here. Did one disappear in the cut and >> > paste? Or are you using a nonstandard shell that eats warnings? Or

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Bryan Van de Ven
Neal Becker wrote: > I'm perfectly happy with python myself, but I wonder if anyone has good > arguments for why to prefer python over matlab? > From my own experience, once you move past static plots and want to include some kind of interactive GUI (that is, build an actual application) then y

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Robert Kern
Neal Becker wrote: > I'm perfectly happy with python myself, but I wonder if anyone has good > arguments for why to prefer python over matlab? The things that I get annoyed with every time I have to read some Matlab code are the lack of namespaces and first-class function objects. -- Robert Kern

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Matthew Brett
Hi, On 4/25/07, Neal Becker <[EMAIL PROTECTED]> wrote: > I'm interested in this comparison (not in starting yet another flame fest). > I actually know nothing about matlab, but almost all my peers use it. One > of the things I recall reading on this subject is that matlab doesn't > support OO sty

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread Christopher Barker
Neal Becker wrote: > I'm interested in this comparison There have got to be comparison's on the web -- google away! My few comments: > I happened to look on the matlab vendor's > website, and found that it does have classes. Matlab added classes in a fairly recent version, so technically, yes, i

[Numpy-discussion] matlab vs. python question

2007-04-25 Thread Neal Becker
I'm interested in this comparison (not in starting yet another flame fest). I actually know nothing about matlab, but almost all my peers use it. One of the things I recall reading on this subject is that matlab doesn't support OO style programming. I happened to look on the matlab vendor's webs

Re: [Numpy-discussion] numpy migration

2007-04-25 Thread Timothy Hochberg
On 4/24/07, Duncan Smith <[EMAIL PROTECTED]> wrote: Timothy Hochberg wrote: [SNIP] > > You should be getting a warning here. Did one disappear in the cut and > paste? Or are you using a nonstandard shell that eats warnings? Or an old > version of numpy? > Python 2.5.1 / numpy 1.0.1 / I

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Keith Goodman
On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > On 4/25/07, John Hunter <[EMAIL PROTECTED]> wrote: > > On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > > > Since authors are allowed by their publication policy to keep a > > > publicly available copy of their papers on their personal

Re: [Numpy-discussion] Oddity with numpy.int64 integer division

2007-04-25 Thread Timothy Hochberg
On 4/24/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: On Tue, 24 Apr 2007, Timothy Hochberg apparently wrote: > Personally I'd opt for completely following Python here, > with the C-like integer division and mod operators > available as appropriately named ufuncs somewhere. It's > a backwards inco

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Fernando Perez
On 4/25/07, John Hunter <[EMAIL PROTECTED]> wrote: > On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > > Since authors are allowed by their publication policy to keep a > > publicly available copy of their papers on their personal website, > > here's the ipython one: > > Didn't know that...

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Keith Goodman
On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > On 4/25/07, Andrew Straw <[EMAIL PROTECTED]> wrote: > > The May/June issue of Computing in Science and Engineering > > http://computer.org/cise: is out and has a Python theme. Many folks we > > know and love from the community and mailing list

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread John Hunter
On 4/25/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > Since authors are allowed by their publication policy to keep a > publicly available copy of their papers on their personal website, > here's the ipython one: Didn't know that... here's a link to my matplotlib article http://nitace.bsd.uchi

Re: [Numpy-discussion] [Matplotlib-users] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Fernando Perez
On 4/25/07, Andrew Straw <[EMAIL PROTECTED]> wrote: > The May/June issue of Computing in Science and Engineering > http://computer.org/cise: is out and has a Python theme. Many folks we > know and love from the community and mailing lists contribute to the > issue. Read articles by Paul Dubois and

[Numpy-discussion] Python issue of Computing in Science and Engineering available

2007-04-25 Thread Andrew Straw
The May/June issue of Computing in Science and Engineering http://computer.org/cise: is out and has a Python theme. Many folks we know and love from the community and mailing lists contribute to the issue. Read articles by Paul Dubois and Travis Oliphant for free online.