[SciPy-Dev] scipy.io matlab reader - things to change before 0.8.0

Matthew Brett matthew.brett at gmail.com
Wed May 26 14:25:58 EDT 2010


Hi Ralf,

On Wed, May 26, 2010 at 8:03 AM, Ralf Gommers
<ralf.gommers at googlemail.com> wrote:
> There are a number of deprecations that explicitly mention "remove after
> 0.7", see below. There are many more that don't mention either when the
> deprecation started or when the feature/function/whatever is removed (would
> be handy for future deprecations...). If you feel responsible for a certain
> part of scipy, can you please check that part for deprecations for 0.8.0?

Thanks very much for taking care of this, sorry for the relative silence...

struct_as_record change
====================

For scipy.io.matlab, I propose one big change to the default behavior
of the readers:

scipy.io.loadmat should _default_ to struct_as_record = True

There's been a warning about this since 0.7.0 and in SVN from November
2008. However - it is a big change.   Any comments?

Others
======

There's a FutureWarning for the default on writing 1D arrays.  At the
moment the default is that 1D arrays written to matlab 4 files are row
vectors in matlab, but they are column vectors for matlab 5 files.
There has been a warning about this from 0.7.1.   I propose to leave
this change until the next version.

There's a FutureWarning for:

scipy.io.loadmat('somefile') # when looking for somefile.mat

I propose to upgrade to a DeprecationWarning

There are DeprecationWarnings for:

scipy.io.loadmat('somefile.mat', basename='something')
scipy.io.savemat('somefile.mat', a_3D_array, format='4') # currently
silently saves to 2D matrix

I propose to upgrade to an Exception in both cases.

Any comments gratefully received...

Matthew



More information about the SciPy-Dev mailing list