[SciPy-dev] Matlab io bug; request for advice

Nathan Bell wnbell@gmail....
Thu Feb 19 13:07:17 CST 2009


On Thu, Feb 19, 2009 at 1:45 PM, Gregor Thalhammer
<gregor.thalhammer@gmail.com> wrote:
>
> Why not converting matlab 1xN or Nx1 arrays to numpy 1d arrays when
> loading from a matlab file? (If I remember correctly, this has been the
> case long time ago, at least in some of the predecessors of scipy.io). I
> guess this change would create more protest, at least on this list,
> since it would break python code instead of matlab code.
>

If I store a 1xN or Nx1 array in a .mat I expect the matrix I read
back later to have the same dimensions.  Think of how obnoxious it
would be if I had a code that (depending on the input) might write a
Nx3 or a Nx2 or a Nx1 matrix to disk, and then read that back at a
later time.

If someone has a proper 2d matrix in numpy we ought to respect their
(explicit) intentions.

-- 
Nathan Bell wnbell@gmail.com
http://graphics.cs.uiuc.edu/~wnbell/


More information about the Scipy-dev mailing list