bundles / numpy 2.4.3 / numpy / matrixlib / defmatrix / matrix / tolist
function
numpy.matrixlib.defmatrix:matrix.tolist
Signature
def tolist(self)Summary
Return the matrix as a (possibly nested) list.
Extended Summary
See ndarray.tolist for full documentation.
Examples
x = np.matrix(np.arange(12).reshape((3,4))); x x.tolist()✓
[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]
See also
- ndarray.tolist
Aliases
numpy.matrix.tolist