matrix_props.is_positive¶
Checks if the matrix is positive.
Functions¶
|
Check if the matrix is positive. |
Module Contents¶
- matrix_props.is_positive.is_positive(input_mat)¶
Check if the matrix is positive.
When all the entries in the matrix are larger than zero the matrix of interest is a positive matrix [1].
Note
This function is different from
matrix_props.is_positive_definite
,matrix_props.is_totally_positive
andmatrix_props.is_positive_semidefinite
.Examples
We expect a matrix full of 1s to be positive.
>>> import numpy as np >>> from toqito.matrix_props import is_positive >>> input_mat = np.array([[1, 1, 1],[1, 1, 1],[1, 1, 1]]) >>> is_positive(input_mat) np.True_
References
[1]Wikipedia. Nonnegative matrix. URL: https://en.wikipedia.org/wiki/Nonnegative_matrix.
- input_mat: np.ndarray
Matrix of interest.
- Parameters:
input_mat (numpy.ndarray)
- Return type:
bool