quemb.shared.helper.ravel_symmetric

quemb.shared.helper.ravel_symmetric(a, b)

Flatten the index a, b assuming symmetry.

The resulting indexation for a matrix looks like this:

0
1   2
3   4   5
6   7   8   9

Works element-wise for scalars and for arrays of indices.

Parameters:
Return type:

TypeVar(_T_Integral, bound= int | integer) | GenericAlias[TypeVar(_T_int_dtype, bound= integer)]