Performs the operation __int__.
(self: Array, /)
| 575 | return self.__class__._new(res) |
| 576 | |
| 577 | def __int__(self: Array, /) -> int: |
| 578 | """ |
| 579 | Performs the operation __int__. |
| 580 | """ |
| 581 | # Note: This is an error here. |
| 582 | if self._array.ndim != 0: |
| 583 | raise TypeError("int is only allowed on arrays with 0 dimensions") |
| 584 | if self.dtype in _complex_floating_dtypes: |
| 585 | raise TypeError("int is not allowed on complex floating-point arrays") |
| 586 | res = self._array.__int__() |
| 587 | return res |
| 588 | |
| 589 | def __index__(self: Array, /) -> int: |
| 590 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected