summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-03-26 17:50:20 +0000
committerGitHub <noreply@github.com>2020-03-26 12:50:20 -0500
commit1c58504eec43f9ba18ac835131fed496fb59772d (patch)
tree4ffc786c9cdac81887680aa999ae6dcbd4bd407d /numpy/ma/core.py
parent5ff70eb0fd61a39207d5166479507e1b099cb707 (diff)
downloadnumpy-1c58504eec43f9ba18ac835131fed496fb59772d.tar.gz
MAINT: simplify code that assumes str/unicode and int/long are different types (#15816)
Cleanup from the dropping of python 2
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 5c446252b..d806747fc 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -4327,17 +4327,6 @@ class MaskedArray(ndarray):
raise MaskError('Cannot convert masked element to a Python int.')
return int(self.item())
- def __long__(self):
- """
- Convert to long.
- """
- if self.size > 1:
- raise TypeError("Only length-1 arrays can be converted "
- "to Python scalars")
- elif self._mask:
- raise MaskError('Cannot convert masked element to a Python long.')
- return long(self.item())
-
@property
def imag(self):
"""