def get_missing_bins(original, trimmed):
original_diag = np.diag(original)<EOL>trimmed_diag = np.diag(trimmed)<EOL>index = []<EOL>m = min(original.shape)<EOL>for j in range(min(trimmed.shape)):<EOL><INDENT>k = <NUM_LIT:0><EOL>while original_diag[j + k] != trimmed_diag[j] and k < <NUM_LIT:2> * m:<EOL><INDENT>k += <NUM_LIT:1><EOL><DEDENT>index.append(k + j)<EOL><DEDENT>return np.array(index)<EOL>
Retrieve indices of a trimmed matrix with respect to the original matrix.
    Fairly fast but is only correct if diagonal values are different, which is
    always the case in practice.