spyrit.misc.matrix_tools.Permutation_Matrix

spyrit.misc.matrix_tools.Permutation_Matrix(mat)[source]

Returns permutation matrix from sampling matrix

Args:
Mat (np.ndarray):

N-by-N sampling matrix, where high values indicate high significance.

Returns:

P (np.ndarray): N^2-by-N^2 permutation matrix (boolean)

Warning

This function is a duplicate of spyrit.misc.sampling.Permutation_Matrix() and will be removed in a future release.

Note

Consider using sort_by_significance() for increased computational performance if using Permutation_Matrix() to reorder a matrix as follows: y = Permutation_Matrix(Ord) @ Mat