Convert to int.
(self)
| 4457 | return float(self.item()) |
| 4458 | |
| 4459 | def __int__(self): |
| 4460 | """ |
| 4461 | Convert to int. |
| 4462 | |
| 4463 | """ |
| 4464 | if self.size > 1: |
| 4465 | raise TypeError("Only length-1 arrays can be converted " |
| 4466 | "to Python scalars") |
| 4467 | elif self._mask: |
| 4468 | raise MaskError('Cannot convert masked element to a Python int.') |
| 4469 | return int(self.item()) |
| 4470 | |
| 4471 | @property |
| 4472 | def imag(self): |