Convert to int.
(self)
| 4524 | return float(self.item()) |
| 4525 | |
| 4526 | def __int__(self): |
| 4527 | """ |
| 4528 | Convert to int. |
| 4529 | |
| 4530 | """ |
| 4531 | if self.size > 1: |
| 4532 | raise TypeError("Only length-1 arrays can be converted " |
| 4533 | "to Python scalars") |
| 4534 | elif self._mask: |
| 4535 | raise MaskError('Cannot convert masked element to a Python int.') |
| 4536 | return int(self.item()) |
| 4537 | |
| 4538 | @property |
| 4539 | def imag(self): |