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

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Feb 18 21:31:14 CST 2009


Hi Matthew,

Matthew Brett wrote:
> However, matlab tends to think of an unshaped vector as being a row vector:
>   

As you know, matlab does not have any rank 1 array concept. You can
either create matrix (2 dimensions) or 'array' (N dimensions). I think
there will always be problems at this level because of this mismatch.

> It seems to me then, that I should assume the same, that a 1
> dimensional array is a row vector.   However, this will change the
> matlab shape of a 1 d array passed into the matlab mat file routines
> from a column vector to a row vector.
>
> Do y'all think I should:
>
> a) Given this is undocumented anyway, just switch to the row vector
>   

It may be undocumented, but I think it is safe to assume it will break a
lot of code. If it changes, I think it is better to raise a warning
before changing it. Because of the mismatch mentioned above, there may
not be such as thing as best solution; one choice shall be made, and
then we should stick to it.

cheers,

David


More information about the Scipy-dev mailing list