From 01438a848b029b4fb3d3509c7fd313bc0588bd38 Mon Sep 17 00:00:00 2001 From: "M. Eric Irrgang" Date: Sun, 17 Jul 2022 10:55:59 -0500 Subject: Lint. Shorten some lines. --- numpy/array_api/tests/test_asarray.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'numpy/array_api/tests/test_asarray.py') diff --git a/numpy/array_api/tests/test_asarray.py b/numpy/array_api/tests/test_asarray.py index fdcc77506..4a9dd77a0 100644 --- a/numpy/array_api/tests/test_asarray.py +++ b/numpy/array_api/tests/test_asarray.py @@ -31,11 +31,12 @@ def test_dtype_identity(): assert long_int_array is not int_array assert np.asarray(int_array, dtype='q') is not int_array assert np.asarray(long_int_array, dtype='q') is not long_int_array - assert np.asarray(int_array, dtype='l') is not np.asarray(int_array, dtype='l') - assert np.asarray(int_array, dtype='l').base is np.asarray(int_array, dtype='l').base + assert long_int_array is not np.asarray(int_array, dtype='l') + assert long_int_array.base is np.asarray(int_array, dtype='l').base equivalent_requirement = np.dtype('i', metadata={'spam': True}) - annotated_int_array_alt = np.asarray(annotated_int_array, dtype=equivalent_requirement) + annotated_int_array_alt = np.asarray(annotated_int_array, + dtype=equivalent_requirement) # The descriptors are equivalent, but we have created # distinct dtype instances. assert unequal_type == equivalent_requirement -- cgit v1.2.1