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

Bruce Southey bsouthey at gmail.com
Wed May 26 14:56:15 EDT 2010


On 05/26/2010 01:25 PM, Matthew Brett wrote:
> 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?
>    
Currently this is a open change:
'FutureWarning: Using struct_as_record default value (False) This will 
change to True in future versions'
  FutureWarning: Using oned_as default value ('column') This will change 
to 'row' in future versions'

I do not use this stuff but I think it should be targeted for 0.9 
version or before the 1.0 version.

Also, I think the tests should be silenced from this warning by adding 
the additional arguments to MatFile5Reader. For example,

rdr = MatFile5Reader(stream, struct_as_record = False) # test_mio.py  
line 633

If that is correct, then I can file a patched test_mio.py for most of 
those. There are a couple of other places that I have not determined the 
cause for those warnings.


> 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
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>    

Also, from the email list, the depreciation warnings in scipy/stats 
should be for 0.9:
http://mail.scipy.org/pipermail/scipy-dev/2010-April/014105.html
I do not know how you want to implement the actual version for current 
items (for example, just comment the code) and if other functions need 
to get depreciated.

Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100526/8d6557a3/attachment.html>


More information about the SciPy-Dev mailing list