def reorder_missing_matrix(matrix, missing, reorder_rows=False, reorder_cols=False, is_diagonal=False, inplace=False, prefix=None):
 if (prefix is None):
  prefix = find_best_blas_type((matrix,))[0]
 reorder = prefix_reorder_missing_matrix_map[prefix]
 if (not inplace):
  matrix = np.copy(matrix, order='F')
 reorder(matrix, np.asfortranarray(missing), reorder_rows, reorder_cols, is_diagonal)
 return matrix

def reorder_missing_matrix ( matrix , missing , reorder_rows = False , reorder_cols = False , is_diagonal = False , inplace = False , prefix = None ) : if ( prefix is None ) : prefix = find_best_blas_type ( ( matrix , ) ) [ 0 ] reorder = prefix_reorder_missing_matrix_map [ prefix ] if ( not inplace ) : matrix = np . copy ( matrix , order = 'F' ) reorder ( matrix , np . asfortranarray ( missing ) , reorder_rows , reorder_cols , is_diagonal ) return matrix
reorder the rows or columns of a time-varying matrix where all non-missing values are in the upper left corner of the matrix .