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

statistics.utils.utils.vector_eq(vec_1, vec_2)[source]

Performs equality check between two vectors

Parameters:
  • vec_1 (List[SecureFixedPoint]) –

  • vec_2 (List[SecureFixedPoint]) –

Return type:

List[SecureFixedPoint]

Returns:

A vector of equalities