sda.misc.basics#
Original Spy package functions, moved into SDA to avoid Spy dependency.
Functions#
|
Transpose an array if necessary. |
|
Return the dictionary key with max value. |
Module Contents#
- sda.misc.basics.autoturn(data, key=-1)#
Transpose an array if necessary.
- Parameters:
data (
np.ndarray) – Array to transpose.key (
int, optional) – Key value: - 0: don’t transpose. - 1: transpose. - -1: auto: make sure the vectors are along the longest dimension, by default -1.
- Returns:
Transposed array.
- Return type:
np.ndarray- Raises:
ValueError – If key is not 0, 1 or -1.