summaryrefslogtreecommitdiff
path: root/scipy/base/ma.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-12-26 09:27:42 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-12-26 09:27:42 +0000
commit65d5f7fc7378e7d8a05125c667ae933b7a6c040f (patch)
tree6dba6f7ca866e340758b72161d22777454933e5b /scipy/base/ma.py
parentc46f1525791d6b78b80ccb3dca01581d1ff30ed4 (diff)
downloadnumpy-65d5f7fc7378e7d8a05125c667ae933b7a6c040f.tar.gz
Changed .toscalar() method to .item()
Diffstat (limited to 'scipy/base/ma.py')
-rw-r--r--scipy/base/ma.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scipy/base/ma.py b/scipy/base/ma.py
index db9538166..874c62319 100644
--- a/scipy/base/ma.py
+++ b/scipy/base/ma.py
@@ -1305,7 +1305,7 @@ array(data = %(data)s,
return self._data.dtype
dtype = property(fget=_get_dtype, doc="type of the array elements.")
- def toscalar(self):
+ def item(self):
"Return Python scalar if possible."
if self._mask is not None:
m = oldnumeric.ravel(self._mask)
@@ -1314,7 +1314,7 @@ array(data = %(data)s,
return masked
except IndexError:
return masked
- return self._data.toscalar()
+ return self._data.item()
def tolist(self, fill_value=None):
"Convert to list"