permute_axes_subtract#
- niriss_tools.sed.permute_axes_subtract(arr, axis=0)[source]#
Find the difference between all pairs of points.
Original solution taken from https://stackoverflow.com/questions/55353703.
- Parameters:
- arr
ArrayLike The (n_0 x … n_i) array containing the data.
- axis
int, optional The axis along which to find all combinations of differences, by default 0.
- arr
- Returns:
ArrayLikeThe colour combination array. The additional axis will be inserted after axis, e.g. for an (m x n) array and axis=0, an (m x m x n) array will be returned.