numpy.matrix.any — NumPy v2.6.dev0 Manual

method

matrix.any(axis=None, out=None)

[source]

#

Test whether any array element along a given axis evaluates to True.

Refer to

numpy.any

for full documentation.

Parameters:axisint, optionalAxis along which logical OR is performed

outndarray, optionalOutput to existing array instead of creating new one, must have same shape as expected output

Returns:anybool, ndarrayReturns a single bool if axis is None; otherwise, returns

ndarray