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

2007-02-24 Thread Charles R Harris
On 25 Feb 2007 01:44:01 +, Alexander Schmolck <[EMAIL PROTECTED]> wrote: "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 >

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 > >a sane way to avoid copying by sharing data bet

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

2007-02-24 Thread Andrew Straw
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 and matlab the >copying could likely be done

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

2007-02-23 Thread Charles R Harris
On 23 Feb 2007 21:19:05 +, Alexander Schmolck <[EMAIL PROTECTED]> wrote: 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

[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