statistics.utils.utils module
Utilities to be used within the statistics package.
- statistics.utils.utils.matrix_transpose(matrix)[source]
Transpose a list of lists.
A = [[31, 64], [32, 68], [33, 72], [34, 76]] matrix_transpose(A) == [[31, 32, 33, 34], [64, 68, 72, 76]]
- Parameters:
matrix (
List
[List
[TypeVar
(AnyTV
)]]) – Matrix stored as list of lists- Return type:
List
[List
[TypeVar
(AnyTV
)]]- Returns:
Transpose of matrix