[Scipy-tickets] [SciPy] #653: global name 'Mat5CellWriter' is not defined

SciPy scipy-tickets@scipy....
Mon Apr 21 18:23:22 CDT 2008


#653: global name 'Mat5CellWriter' is not defined
--------------------+-------------------------------------------------------
 Reporter:  nich2o  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  0.7     
Component:  Other   |     Version:          
 Severity:  normal  |    Keywords:          
--------------------+-------------------------------------------------------
 Mat5CellWriter doesn't exist in scipy/io/matlab/mio5.py

 To reproduce:

 {{{
 import scipy.io as io
 io.savemat('test', {'d':{1:2}}, format='5')
 }}}

 {{{
 In [8]: io.savemat('test', {'d':{1:2}}, format='5')
 ---------------------------------------------------------------------------
 <type 'exceptions.NameError'>             Traceback (most recent call
 last)

 /home/thor/projects/v1s/release_new_version/<ipython console> in
 <module>()

 /usr/lib/python2.5/site-packages/scipy/io/matlab/mio.py in
 savemat(file_name, mdict, appendmat, format)
     129     else:
     130         raise ValueError, 'Format should be 4 or 5'
 --> 131     MW.put_variables(mdict)
     132     if file_is_string:
     133         file_stream.close()

 /usr/lib/python2.5/site-packages/scipy/io/matlab/mio5.py in
 put_variables(self, mdict)
     808                 var,
     809                 name,
 --> 810                 is_global,
     811                 ).write()
     812             stream = self.writer_getter.stream

 /usr/lib/python2.5/site-packages/scipy/io/matlab/mio5.py in
 matrix_writer_factory(self, arr, name, is_global)
     714             types, arr_type = self.classify_mobjects(arr)
     715             if arr_type == 'c':
 --> 716                 return Mat5CellWriter(self.stream, arr, name,
 is_global, types)
     717             elif arr_type == 's':
     718                 return Mat5StructWriter(self.stream, arr, name,
 is_global)

 <type 'exceptions.NameError'>: global name 'Mat5CellWriter' is not defined
 }}}

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


More information about the Scipy-tickets mailing list