[Numpy-discussion] [ANN] mlabwrap 1.0.1

2009-03-24 Thread Alexander Schmolck
Mlabwrap allows pythonistas to interface to Matlab(tm) in a very straightforward fashion: from mlabwrap import mlab mlab.eig([[0,1],[1,1]]) array([[-0.61803399], [ 1.61803399]]) More at http://mlabwrap.sourceforge.net. Mlabwrap 1.0.1 is just a maintenance release that

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-21 Thread Alexander Schmolck
David Cournapeau [EMAIL PROTECTED] writes: Alexander Schmolck wrote: Charles R Harris [EMAIL PROTECTED] writes: The automatic handling of pointers for the default allocation type is also convenient and makes it reasonable to have functions return matrices and vectors. Hmm, I

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-20 Thread Alexander Schmolck
Charles R Harris [EMAIL PROTECTED] writes: The automatic handling of pointers for the default allocation type is also convenient and makes it reasonable to have functions return matrices and vectors. Hmm, I wonder whether I missed something when I read the manual. I didn't see anything in the

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread Alexander Schmolck
Christopher Barker [EMAIL PROTECTED] writes: Alexander Schmolck wrote: I just saw a closely related question posted one week ago here (albeit mostly from a swig context). SWIG, Boost, whatever, the issues are similar. I guess what I'd love to find is an array implementation that plays

[Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-11 Thread Alexander Schmolck
Hi, I've sent pretty much the same email to c++sig, but I thought I'd also try my luck here, especially since I just saw a closely related question posted one week ago here (albeit mostly from a swig context). I'm working working on an existing scientific code base that's mostly C++ and I'm

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Alexander Schmolck
Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and max(). What's wrong with inf? I'm not sure integer reductions should have max/min-ints as

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Alexander Schmolck
Robert Kern [EMAIL PROTECTED] writes: Alexander Schmolck wrote: Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and max(). What's wrong

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

2007-05-05 Thread Alexander Schmolck
Bill Baxter [EMAIL PROTECTED] writes: also pulls the numpy namespace into the global one. For debugger integration, is there any way to set up ipython so that on errors it will pop up a GUI debugger that shows the line of source code where the error occured and let you set break points?

[Numpy-discussion] [ANN] mlabrap-1.0final: a high level python to matlab

2007-04-11 Thread Alexander Schmolck
the list is low-volume and subscription is recommended. Discussion of mlabwrap development takes place on the scipy-dev (please mention mlabwrap in the subject line): http://projects.scipy.org/mailman/listinfo/scipy-dev cheers, Alexander Schmolck, mlabwrap author and maintainer

Re: [Numpy-discussion] Python vector and matrix formatter similar to Matlab

2007-03-10 Thread Alexander Schmolck
Simon Wood [EMAIL PROTECTED] writes: To all, I came across an old thread in the archives in which Alexander Schmolck gave an example of a Matlab like matrix formatter he authored for Python. Is this formatter still available some where? Yup. I've still got it as part of a matrix class I

[Numpy-discussion] [ANN] mlabrap-1.0b: a high level python to matlab

2007-02-27 Thread Alexander Schmolck
URL --- http://mlabwrap.sourceforge.net Description --- Mlabwrap-1.0 is a high-level python to matlab(tm) bridge that makes calling matlab functions from python almost as convenient as using a normal python library. It is available under a very liberal license (BSD/MIT) and should work

Re: [Numpy-discussion] Fortran order arrays to and from numpy arrays

2007-02-24 Thread Alexander Schmolck
Andrew Straw [EMAIL PROTECTED] writes: Alexander Schmolck wrote: 2. Despite this overhead, copying around large arrays (e.g. =1e5 elements) in above way causes notable additional overhead. Whilst I don't think there's a sane way to avoid copying by sharing data between numpy

Re: [Numpy-discussion] Fortran order arrays to and from numpy arrays

2007-02-24 Thread Alexander Schmolck
Charles R Harris [EMAIL PROTECTED] writes: Unfortunately I don't see an easy way to use the same approach the other way (matlab doesn't seem to offer much on the C level to manipulate arrays), so I'd presumably need something like:

[Numpy-discussion] Fortran order arrays to and from numpy arrays

2007-02-23 Thread Alexander Schmolck
Hi, I'm currently puzzling over how to best convert (column major order) matlab arrays to numpy arrays and vice versa -- I'm looking for a solution that's simple, general and reasonably fast -- being also applicable to Numeric arrays would be a plus (I'd like to retain Numeric compatibility for

Re: [Numpy-discussion] force column vector

2007-02-09 Thread Alexander Schmolck
Christian [EMAIL PROTECTED] writes: Hi, when creating an ndarray from a list, how can I force the result to be 2d *and* a column vector? So in case I pass a nested list, there will be no modification of the shape and when I pass a simple list, it will be converted to a 2d column vector. I