def Matrix(data, typecode=None, copy=<NUM_LIT:1>, savespace=<NUM_LIT:0>):
if isinstance(data, type("<STR_LIT>")):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>a = fromlist(data, type=typecode)<EOL>if a.rank == <NUM_LIT:0>:<EOL><INDENT>a.shape = (<NUM_LIT:1>,<NUM_LIT:1>)<EOL><DEDENT>elif a.rank == <NUM_LIT:1>:<EOL><INDENT>a.shape = (<NUM_LIT:1>,) + a.shape<EOL><DEDENT>a.__class__ = _Matrix<EOL>return a<EOL>
Matrix constructs new matrices from 2D nested lists of numbers