MCPcopy Index your code
hub / github.com/numpy/numpy / __int__

Method __int__

numpy/ma/core.py:4526–4536  ·  view source on GitHub ↗

Convert to int.

(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

MaskErrorClass · 0.85
itemMethod · 0.80

Tested by

no test coverage detected