Performs the operation __bool__.
(self: Array, /)
| 461 | return array_api |
| 462 | |
| 463 | def __bool__(self: Array, /) -> bool: |
| 464 | """ |
| 465 | Performs the operation __bool__. |
| 466 | """ |
| 467 | # Note: This is an error here. |
| 468 | if self._array.ndim != 0: |
| 469 | raise TypeError("bool is only allowed on arrays with 0 dimensions") |
| 470 | res = self._array.__bool__() |
| 471 | return res |
| 472 | |
| 473 | def __complex__(self: Array, /) -> complex: |
| 474 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected