pyacs.lib.glinalg.symmetrize
Form a symmetric matrix from the upper or lower triangle.
- pyacs.lib.glinalg.symmetrize.symmetrize(a, type_matrix)[source]
Form a symmetric matrix from the upper or lower triangle.
- Parameters:
a (numpy.ndarray) – 2D square array.
type_matrix (str) – ‘triu’ or ‘tril’; which triangle is used to build the symmetric matrix.
- Returns:
Symmetric matrix.
- Return type:
numpy.ndarray