[SciPy-dev] Patch for writing Matlab structs with long field names

David Cournapeau david@ar.media.kyoto-u.ac...
Sat Dec 6 05:04:41 CST 2008

Vebjorn Ljosa wrote:
> "Matthew Brett" <matthew.brett@gmail.com> writes:
>> Thanks for the patch, it's good, but - what makes you think matlab can
>> handle 64 characters of fieldname?
> The actual behaviour of the current version of Matlab is to both read
> and write fieldnames of up to 64 characters (63 characters + NUL).  We
> discovered this because we encountered some .mat files in the wild that
> broke our scipy scripts.
> It is possible that some previous Matlab version can only handle 32
> characters.  Even with the patch, this should not cause problems as long
> as the actual fieldnames your write are no longer than 32 characters.

What about allowing reading up to 64 bytes strings but only writing up
to 32  - at least by default ?


More information about the Scipy-dev mailing list