aspcore.matrices.ensure_hermitian

aspcore.matrices.ensure_hermitian(mat, overwrite_ok=True)

Symmetrizes mat if it is not already Hermitian

Parameters:
  • mat (ndarray of shape (a, a))

  • overwrite_ok (bool, optional) – if True, the matrix is modified in place.

Returns:

mat

Return type:

ndarray of shape (a, a)