Test whether any array element along a given axis evaluates to True. Refer to `numpy.any` for full documentation. Parameters ---------- axis : int, optional Axis along which logical OR is performed out : ndarray, optional Out
(self, axis=None, out=None)
| 552 | return N.ndarray.prod(self, axis, dtype, out, keepdims=True)._collapse(axis) |
| 553 | |
| 554 | def any(self, axis=None, out=None): |
| 555 | """ |
| 556 | Test whether any array element along a given axis evaluates to True. |
| 557 | |
| 558 | Refer to `numpy.any` for full documentation. |
| 559 | |
| 560 | Parameters |
| 561 | ---------- |
| 562 | axis : int, optional |
| 563 | Axis along which logical OR is performed |
| 564 | out : ndarray, optional |
| 565 | Output to existing array instead of creating new one, must have |
| 566 | same shape as expected output |
| 567 | |
| 568 | Returns |
| 569 | ------- |
| 570 | any : bool, ndarray |
| 571 | Returns a single bool if `axis` is ``None``; otherwise, |
| 572 | returns `ndarray` |
| 573 | |
| 574 | """ |
| 575 | return N.ndarray.any(self, axis, out, keepdims=True)._collapse(axis) |
| 576 | |
| 577 | def all(self, axis=None, out=None): |
| 578 | """ |