numpy.matrix.any#

方法

matrix.any(axis=None, out=None)[原始碼]#

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

Refer to numpy.any for full documentation.

參數:
axisint, optional

Axis along which logical OR is performed

outndarray, optional

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

回傳值:
anybool, ndarray

Returns a single bool if axis is None; otherwise, returns ndarray