np_any_axis0
- dtaianomaly.utils.np_any_axis0(x)[source]
Numba implementation for np.any(x, axis=0).
Iterates over the columns of the given matrix and applies a logical OR to it. Thus, if any value in column \(j\) is True, then the value at position \(j\) in the output will be True.
- Parameters:
- xnp.ndarray of shape (N, M)
The array on which the numpy-call should be applied.
- Returns:
- np.array of shape (M,)
Identical as np.any(x, axis=0).
Examples
>>> import numpy as np >>> from dtaianomaly.utils import np_any_axis0 >>> np_any_axis0(np.array([[True, False, True, False], [False, False, True, True]])) array([ True, False, True, True])