dof
- compas.numerical.dof(A, tol=0.001, condition=False)[source]
Returns the degrees-of-freedom of the input matrix A.
- Parameters
A (array-like) – Matrix A represented as an array or list.
tol (float (0.001)) – Tolerance.
condition (bool (False)) – Return the condition number of the matrix.
- Returns
int – Column degrees-of-freedom.
int – Row degrees-of-freedom.
float – Condition number, if
condition
isTrue
.
Notes
The degrees-of-freedom are the number of columns and rows minus the rank.
Examples
>>> dof([[2, -1, 3], [1, 0, 1], [0, 2, -1], [1, 1, 4]], condition=True) (0, 1, 5.073596551276727)