[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 . Mlabwrap 1.0.1 is just a maintenance release

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

2007-09-23 Thread Alexander Schmolck
"Bill Baxter" <[EMAIL PROTECTED]> writes: >> But say I want to pass a big matrix of datapoints to a classifier -- how >> would >> expression templates help here? Ublas does have various view objects, but >> they're of limited usefulness, because they don't provide the same >> functionality as the

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

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

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 > f

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

2007-09-11 Thread Alexander Schmolck
Philip Austin <[EMAIL PROTECTED]> writes: > Alexander Schmolck writes: > > > So my question is: might it make sense to use (a slightly wrapped) > > numpy.ndarray, and if so is some code already floating around for that (on > > first glance it seems like th

[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 curre

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

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] 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 point

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

2007-04-11 Thread Alexander Schmolck
eedback and keep informed about new releases is mlabwrap-user: <https://lists.sourceforge.net/lists/listinfo/mlabwrap-user> 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):

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

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

2007-02-27 Thread Alexander Schmolck
URL --- 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
"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: > > > > stuff_into_matlab_array(a.T.resh

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 >

[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 th

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 ve