Ask Your Question

Revision history [back]

maximum element of a matrix

How to determine the maximum element of a matrix? For "matrix_integer_dense" there is height() [1]. For numpy matrix there is max function. How to do it in Sage matrices with one single "max" like instruction ?

[1] http://www.sagemath.org/doc/reference/matrices/sage/matrix/matrix_integer_dense.html

[2] Alternetive: m.numpy().max()

click to hide/show revision 2
retagged

maximum element of a matrix

How to determine the maximum element of a matrix? For "matrix_integer_dense" there is height() [1]. For numpy matrix there is max function. How to do it in Sage matrices with one single "max" like instruction ?

[1] http://www.sagemath.org/doc/reference/matrices/sage/matrix/matrix_integer_dense.html

[2] Alternetive: m.numpy().max()