diff options
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/_globals.py | 2 | ||||
| -rw-r--r-- | numpy/core/tests/test_api.py | 3 | ||||
| -rw-r--r-- | numpy/core/tests/test_multiarray.py | 10 |
3 files changed, 10 insertions, 5 deletions
diff --git a/numpy/_globals.py b/numpy/_globals.py index 97007b51e..5e8a4557a 100644 --- a/numpy/_globals.py +++ b/numpy/_globals.py @@ -89,4 +89,4 @@ class _NoValueType: return "<no value>" -_NoValue = _NoValueType()
\ No newline at end of file +_NoValue = _NoValueType() diff --git a/numpy/core/tests/test_api.py b/numpy/core/tests/test_api.py index e3e07138d..c2a2e712c 100644 --- a/numpy/core/tests/test_api.py +++ b/numpy/core/tests/test_api.py @@ -621,6 +621,7 @@ def test_astype_copyflag(): # Simple tests for when a copy is necessary: res_false = arr.astype(np.float64, copy=False) assert_array_equal(res_false, arr) - res_if_needed = arr.astype(np.float64, copy=np.array_api.CopyMode.IF_NEEDED) + res_if_needed = arr.astype(np.float64, + copy=np.array_api.CopyMode.IF_NEEDED) assert_array_equal(res_if_needed, arr) assert_raises(ValueError, arr.astype, np.float64, copy=np.array_api.CopyMode.NEVER) diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index c51d2766e..4c598da1f 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -7861,7 +7861,9 @@ class TestArrayCreationCopyArgument(object): res = np.array(arr, copy=copy, dtype=int2) assert res is arr or res.base is arr - res = np.array(arr, copy=np.array_api.CopyMode.NEVER, dtype=int2) + res = np.array(arr, + copy=np.array_api.CopyMode.NEVER, + dtype=int2) assert res is arr or res.base is arr else: @@ -7872,7 +7874,8 @@ class TestArrayCreationCopyArgument(object): assert_array_equal(res, arr) assert_raises(ValueError, np.array, - arr, copy=np.array_api.CopyMode.NEVER, dtype=int2) + arr, copy=np.array_api.CopyMode.NEVER, + dtype=int2) def test_buffer_interface(self): @@ -7976,7 +7979,8 @@ class TestArrayCreationCopyArgument(object): if not IS_PYPY: assert res is arr or res.base.obj is arr - res = np.array(view, copy=np.array_api.CopyMode.NEVER, order=order2) + res = np.array(view, copy=np.array_api.CopyMode.NEVER, + order=order2) if not IS_PYPY: assert res is arr or res.base.obj is arr else: |
