summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_extras.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-08-01 20:29:36 +0000
committerCharles Harris <charlesr.harris@gmail.com>2017-08-05 10:36:48 -0600
commit2b781f8967488dc007f8f0a1e6a7f49208788d12 (patch)
tree88ad7478e033ce5980a365a479e22b78ba1cecaa /numpy/ma/tests/test_extras.py
parent5ab02b15de72fa00d785f49c62466fe048264cc4 (diff)
downloadpython-numpy-2b781f8967488dc007f8f0a1e6a7f49208788d12.tar.gz
python-numpy-2b781f8967488dc007f8f0a1e6a7f49208788d12.tar.bz2
python-numpy-2b781f8967488dc007f8f0a1e6a7f49208788d12.zip
MAINT/DOC: Use builtin when np.{x} is builtins.{x}.
This is the case for x in {int, bool, str, float, complex, object}. Using the np.{x} version is deceptive as it suggests that there is a difference. This change doesn't affect any external behaviour. The `long` type is missing in python 3, so np.long is still useful
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r--numpy/ma/tests/test_extras.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index 897a0fd88..1bec584c1 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -660,7 +660,7 @@ class TestApplyOverAxes(object):
test = apply_over_axes(np.sum, a, [0, 2])
ctrl = np.array([[[60], [92], [124]]])
assert_equal(test, ctrl)
- a[(a % 2).astype(np.bool)] = masked
+ a[(a % 2).astype(bool)] = masked
test = apply_over_axes(np.sum, a, [0, 2])
ctrl = np.array([[[28], [44], [60]]])
assert_equal(test, ctrl)
@@ -885,7 +885,7 @@ class TestMedian(object):
def test_nan(self):
with suppress_warnings() as w:
w.record(RuntimeWarning)
- for mask in (False, np.zeros(6, dtype=np.bool)):
+ for mask in (False, np.zeros(6, dtype=bool)):
dm = np.ma.array([[1, np.nan, 3], [1, 2, 3]])
dm.mask = mask