From: Albert S. <fu...@gm...> - 2006-02-23 12:45:08
|
Hello all On 2/23/06, Stefan van der Walt <st...@su...> wrote: > On Thu, Feb 23, 2006 at 01:31:47PM +0200, Albert Strasheim wrote: > > More than 2 dimensions is tricky, since NumPy and MATLAB don't seem to > > agree on how more-dimensional data is organised? As such, I don't know > > what a NumPy user would expect repmat to do with more than 2 > > dimensions. > > To expand on this, here is what I see when I create (M,N,3) matrices > in both octave and numpy. I expect to see an MxN matrix stacked 3 > high: <snip> There are other (unexpected, for me at least) differences between MATLAB/Octave and NumPy too. For a 3D array in MATLAB, only indexing on the last dimension yields a 2D array, where NumPy always returns a 2D array. I put some examples for the 3D case at: http://students.ee.sun.ac.za/~albert/numscipy.html Regards Albert |