diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-08-05 12:09:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-05 12:09:23 -0500 |
commit | bfe43b26969231cfe8196868280c07f0c0aa8f50 (patch) | |
tree | 88ad7478e033ce5980a365a479e22b78ba1cecaa /numpy/lib/tests/test_regression.py | |
parent | 5ab02b15de72fa00d785f49c62466fe048264cc4 (diff) | |
parent | 2b781f8967488dc007f8f0a1e6a7f49208788d12 (diff) | |
download | numpy-bfe43b26969231cfe8196868280c07f0c0aa8f50.tar.gz |
Merge pull request #9517 from charris/rebase-9508
MAINT/DOC: Use builtin when np.{x} is builtins.{x}.
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r-- | numpy/lib/tests/test_regression.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index 1567219d6..74c47df7c 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -108,13 +108,13 @@ class TestRegression(object): def test_polydiv_type(self): # Make polydiv work for complex types msg = "Wrong type, should be complex" - x = np.ones(3, dtype=np.complex) + x = np.ones(3, dtype=complex) q, r = np.polydiv(x, x) - assert_(q.dtype == np.complex, msg) + assert_(q.dtype == complex, msg) msg = "Wrong type, should be float" - x = np.ones(3, dtype=np.int) + x = np.ones(3, dtype=int) q, r = np.polydiv(x, x) - assert_(q.dtype == np.float, msg) + assert_(q.dtype == float, msg) def test_histogramdd_too_many_bins(self): # Ticket 928. @@ -123,11 +123,11 @@ class TestRegression(object): def test_polyint_type(self): # Ticket #944 msg = "Wrong type, should be complex" - x = np.ones(3, dtype=np.complex) - assert_(np.polyint(x).dtype == np.complex, msg) + x = np.ones(3, dtype=complex) + assert_(np.polyint(x).dtype == complex, msg) msg = "Wrong type, should be float" - x = np.ones(3, dtype=np.int) - assert_(np.polyint(x).dtype == np.float, msg) + x = np.ones(3, dtype=int) + assert_(np.polyint(x).dtype == float, msg) def test_ndenumerate_crash(self): # Ticket 1140 @@ -234,7 +234,7 @@ class TestRegression(object): def test_nansum_with_boolean(self): # gh-2978 - a = np.zeros(2, dtype=np.bool) + a = np.zeros(2, dtype=bool) try: np.nansum(a) except Exception: |