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