[Scipy-tickets] [SciPy] #1566: scipy.io.savemat cannot use the OrderedDict collection to make a struct

SciPy Trac scipy-tickets@scipy....
Mon Nov 21 19:58:28 CST 2011


#1566: scipy.io.savemat cannot use the OrderedDict collection to make a struct
-------------------------+--------------------------------------------------
 Reporter:  ali-ebrahim  |       Owner:  somebody   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  scipy.io     |     Version:  0.9.0      
 Keywords:               |  
-------------------------+--------------------------------------------------
 OrderedDict is a collection implemented in CPython 2.7, but cannot be used
 to create a MATLAB struct like a regular dict.

 For example, this code fails, but would work if I made my_struct a dict
 instead of an OrderedDict

 {{{
 from scipy.io import savemat
 from collections import OrderedDict
 my_struct = OrderedDict()
 my_struct["value_1"] = "african swallow"
 my_struct["value_2"] = "european swallow"
 savemat("test.mat", {"my_struct": my_struct})
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1566>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list