np_any_axis1
- dtaianomaly.utils.np_any_axis1(x)[source]
Numba implementation for np.any(x, axis=1).
Iterates over the rows of the given matrix and applies a logical OR to it. Thus, if any value in row \(i\) is True, then the value at position \(i\) 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 (N,)
Identical as np.any(x, axis=1).
Examples
>>> import numpy as np >>> from dtaianomaly.utils import np_any_axis1 >>> np_any_axis1(np.array([[True, True], [True, False], [False, True], [False, False]])) array([ True, True, True, False])