From 2b781f8967488dc007f8f0a1e6a7f49208788d12 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Tue, 1 Aug 2017 20:29:36 +0000 Subject: 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 --- numpy/testing/tests/test_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/testing/tests/test_utils.py') diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index e2c105245..493c538af 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -61,7 +61,7 @@ class _GenericTest(object): def test_objarray(self): """Test object arrays.""" - a = np.array([1, 1], dtype=np.object) + a = np.array([1, 1], dtype=object) self._test_equal(a, 1) def test_array_likes(self): @@ -134,14 +134,14 @@ class TestArrayEqual(_GenericTest, unittest.TestCase): def test_recarrays(self): """Test record arrays.""" - a = np.empty(2, [('floupi', np.float), ('floupa', np.float)]) + a = np.empty(2, [('floupi', float), ('floupa', float)]) a['floupi'] = [1, 2] a['floupa'] = [1, 2] b = a.copy() self._test_equal(a, b) - c = np.empty(2, [('floupipi', np.float), ('floupa', np.float)]) + c = np.empty(2, [('floupipi', float), ('floupa', float)]) c['floupipi'] = a['floupi'].copy() c['floupa'] = a['floupa'].copy() -- cgit v1.2.1