def Matrix(data, typecode=None, copy=1, savespace=0):
 if isinstance(data, type('')):
  raise TypeError('numerix Matrix does not support Numeric matrix string notation.  Use nested lists.')
 a = fromlist(data, type=typecode)
 if (a.rank == 0):
  a.shape = (1, 1)
 elif (a.rank == 1):
  a.shape = ((1,) + a.shape)
 a.__class__ = _Matrix
 return a

def Matrix ( data , typecode = None , copy = 1 , savespace = 0 ) : if isinstance ( data , type ( '' ) ) : raise TypeError ( 'numerix Matrix does not support Numeric matrix string notation.  Use nested lists.' ) a = fromlist ( data , type = typecode ) if ( a . rank == 0 ) : a . shape = ( 1 , 1 ) elif ( a . rank == 1 ) : a . shape = ( ( 1 , ) + a . shape ) a . __class__ = _Matrix return a
matrix constructs new matrices from 2d nested lists of numbers .