@docfiller
def mat_reader_factory(file_name, appendmat=True, **kwargs):
 byte_stream = _open_file(file_name, appendmat)
 (mjv, mnv) = get_matfile_version(byte_stream)
 if (mjv == 0):
  return MatFile4Reader(byte_stream, **kwargs)
 elif (mjv == 1):
  return MatFile5Reader(byte_stream, **kwargs)
 elif (mjv == 2):
  raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
 else:
  raise TypeError(('Did not recognize version %s' % mjv))

@ docfiller def mat_reader_factory ( file_name , appendmat = True , ** kwargs ) : byte_stream = _open_file ( file_name , appendmat ) ( mjv , mnv ) = get_matfile_version ( byte_stream ) if ( mjv == 0 ) : return MatFile4Reader ( byte_stream , ** kwargs ) elif ( mjv == 1 ) : return MatFile5Reader ( byte_stream , ** kwargs ) elif ( mjv == 2 ) : raise NotImplementedError ( 'Please use HDF reader for matlab v7.3 files' ) else : raise TypeError ( ( 'Did not recognize version %s' % mjv ) )
create reader for matlab .