norma/joint_normal.py
def _compute_permutation_matrix(initial_index, final_index):
    """
    Compute the permutation matrix that takes initial_index to final_index
    initial_index: an iterable of indices for the initial unpermuted elements
                   (must contain all integers in range(len(initial_index))
    final_index: an iterable of indices for the initial permuted elements
                   (must contain all integers in range(len(final_index))
    """
    permutation_matrix = np.matrix(np.zeros((len(initial_index), len(initial_index))))
    for final, initial in zip(final_index, initial_index):
        permutation_matrix[initial, final] = 1
    return permutation_matrix

    Compute the permutation matrix that takes initial_index to final_index
    initial_index: an iterable of indices for the initial unpermuted elements
                   (must contain all integers in range(len(initial_index))
    final_index: an iterable of indices for the initial permuted elements
                   (must contain all integers in range(len(final_index))
    
Compute the permutation matrix that takes initial_index to final_index
initial_index: an iterable of indices for the initial unpermuted elements
(must contain all integers in range(len(initial_index))
final_index: an iterable of indices for the initial permuted elements
(must contain all integers in range(len(final_index))
Compute the permutation matrix that takes initial_index to final_index initial_index : an iterable of indices for the initial unpermuted elements ( must contain all integers in range ( len ( initial_index )) final_index : an iterable of indices for the initial permuted elements ( must contain all integers in range ( len ( final_index ))
def _compute_permutation_matrix(initial_index, final_index):
    permutation_matrix = np.matrix(np.zeros((len(initial_index), len(initial_index))))
    for final, initial in zip(final_index, initial_index):
        permutation_matrix[initial, final] = 1
    return permutation_matrix
def _compute_permutation_matrix ( initial_index , final_index ) : permutation_matrix = np . matrix ( np . zeros ( ( len ( initial_index ) , len ( initial_index ) ) ) ) for final , initial in zip ( final_index , initial_index ) : permutation_matrix [ initial , final ] = 1 return permutation_matrix
Compute the permutation matrix that takes initial_index to final_index
initial_index: an iterable of indices for the initial unpermuted elements
(must contain all integers in range(len(initial_index))
final_index: an iterable of indices for the initial permuted elements
(must contain all integers in range(len(final_index))
Compute the permutation matrix that takes initial_index to final_index initial_index : an iterable of indices for the initial unpermuted elements ( must contain all integers in range ( len ( initial_index )) final_index : an iterable of indices for the initial permuted elements ( must contain all integers in range ( len ( final_index ))
"""
    Compute the permutation matrix that takes initial_index to final_index
    initial_index: an iterable of indices for the initial unpermuted elements
                   (must contain all integers in range(len(initial_index))
    final_index: an iterable of indices for the initial permuted elements
                   (must contain all integers in range(len(final_index))
    """
initial_index
final_index