factor_1d#
- caf.van.lgv_model.factor_1d(matrix, total, axis)[source]#
Factor the given axis of matrix to match total.
- Parameters:
matrix (np.ndarray) – Square matrix to be factored.
total (np.ndarray) – The totals that the matrix should be factored to match.
axis (int) – The axis of matrix which should be factored.
- Returns:
The matrix after it has been factored.
- Return type:
np.ndarray
- Raises:
ValueError – If total isn’t the correct shape or axis isn’t 0 or 1.