[Scipy-tickets] [SciPy] #1348: loadmat not returns numpy format

SciPy Trac scipy-tickets@scipy....
Sun Dec 12 23:48:27 CST 2010


#1348: loadmat not returns numpy format
--------------------------+-------------------------------------------------
  Reporter:  Krzysiaczek  |       Owner:  somebody      
      Type:  defect       |      Status:  closed        
  Priority:  high         |   Milestone:  0.9.0         
 Component:  scipy.io     |     Version:  0.8.0         
Resolution:  invalid      |    Keywords:  loadmat, numpy
--------------------------+-------------------------------------------------
Changes (by warren.weckesser):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 As the tutorial and loadmat's docstring explain, the return value of
 loadmat is a ''dictionary'' that contains the variables and their values.
 In your example, to get the numpy array, do this:
 {{{
 contents = loadmat('a.mat')
 a = contents['a']
 a.shape
 }}}

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


More information about the Scipy-tickets mailing list