bundles / numpy latest / numpy / matrixlib / defmatrix / matrix / tolist
function
numpy.matrixlib.defmatrix:matrix.tolist
source: build-install/usr/lib/python3.14/site-packages/numpy/matrixlib/defmatrix.py:272
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