vibrav.util.math module¶
- vibrav.util.math.get_tril(arr, k=0)[source]¶
Get the lower triangular indeces of the input matrix
Note
This has a constraint for square matrices.
- Parameters:
arr (
numpy.array
) – Array to parse the lower triangular elementsk (
int
) – k parameter that goes into the np.tril_indices_from function. Refer to numpy documentation for more information.
- Returns:
triu_arr (
numpy.array
) – 1D array with the lower triangular elements
- vibrav.util.math.get_triu(arr, k=0)[source]¶
Get the upper triangular indeces of the input matrix
Note
This has a constraint for square matrices.
- Parameters:
arr (
numpy.array
) – Array to parse the upper triangular elementsk (
int
) – k parameter that goes into the np.triu_indices_from function. Refer to numpy documentation for more information.
- Returns:
triu_arr (
numpy.array
) – 1D array with the upper triangular elements
- vibrav.util.math.isantihermitian(data)[source]¶
Check if the input array is symmetric.
Note
This function does not determine if there are any non-numeric values. It assumes that you are feeding an array of floats, ints, etc.
- Parameters:
data (
numpy.array
) – Array to be evaluated- Returns:
isherm (
bool
) – Is the array hermitian
- vibrav.util.math.isantisymmetric(data)[source]¶
Check if the input array is symmetric.
Note
This function does not determine if there are any non-numeric values. It assumes that you are feeding an array of floats, ints, etc.
- Parameters:
data (
numpy.array
) – Array to be evaluated- Returns:
isherm (
bool
) – Is the array hermitian
- vibrav.util.math.ishermitian(data)[source]¶
Check if the input array is hermitian.
Note
This function does not determine if there are any non-numeric values. It assumes that you are feeding an array of floats, ints, etc.
- Parameters:
data (
numpy.array
) – Array to be evaluated- Returns:
isherm (
bool
) – Is the array hermitian
- vibrav.util.math.issymmetric(data)[source]¶
Check if the input array is symmetric.
Note
This function does not determine if there are any non-numeric values. It assumes that you are feeding an array of floats, ints, etc.
- Parameters:
data (
numpy.array
) – Array to be evaluated- Returns:
isherm (
bool
) – Is the array hermitian