frlearn.array_functions.remove_diagonal

frlearn.array_functions.remove_diagonal(a)[source]

Remove the diagonal from a square array.

Parameters
a: np.array

Input array of values. Should have shape (n, n).

Returns
b: np.array

An array of shape (n, n-1), containing the same values as the input array, except for the values in the diagonal.