Skip to content

Commit 6677723

Browse files
committed
cleanup
1 parent fc0c812 commit 6677723

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numpy/_core/tests/test_numeric.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ def test_nonzero_dtypes(self):
17151715
zero_indices = np.arange(50)
17161716

17171717
# test for different dtypes
1718-
types = [bool, np.int8, np.int16, np.int32, np.int64, np.float32, np.float64]
1718+
types = [bool, np.float32, np.float64]
17191719
sample = ((2**33)*rng.normal(size=100))
17201720
for dtype in types:
17211721
x = sample.astype(dtype)
@@ -1724,9 +1724,9 @@ def test_nonzero_dtypes(self):
17241724
idxs = np.nonzero(x)[0]
17251725
assert_equal(np.array_equal(np.where(x != 0)[0], idxs), True)
17261726

1727-
unsigned_types = [np.uint8, np.uint16, np.uint32, np.uint64]
1727+
integer_types = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64]
17281728
sample = rng.integers(0, 255, size=100)
1729-
for dtype in unsigned_types:
1729+
for dtype in integer_types:
17301730
x = sample.astype(dtype)
17311731
rng.shuffle(zero_indices)
17321732
x[zero_indices] = 0

0 commit comments

Comments
 (0)