Skip to content

Commit 1fc4732

Browse files
committed
Uncomment tests
1 parent 8a82c0c commit 1fc4732

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

tests/ndarray/test_ndarray.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,18 @@ def test_findex():
296296
# Test 1d fast path
297297
ndim = 1
298298
dtype = np.dtype("float")
299-
# d = 1 + int(blosc2.MAX_FAST_PATH_SIZE / dtype.itemsize) # just over fast path size
300-
d = 10
301-
# shape = (d,) * ndim
302-
# arr = blosc2.linspace(0, 100, num=np.prod(shape), shape=shape, dtype=dtype)
303-
# rng = np.random.default_rng()
304-
# idx = rng.integers(low=0, high=d, size=(d // 4,))
305-
# nparr = arr[:]
306-
# b = arr[idx]
307-
# n = nparr[idx]
308-
# np.testing.assert_allclose(b, n)
299+
d = 1 + int(blosc2.MAX_FAST_PATH_SIZE / dtype.itemsize) # just over fast path size
300+
shape = (d,) * ndim
301+
arr = blosc2.linspace(0, 100, num=np.prod(shape), shape=shape, dtype=dtype)
302+
rng = np.random.default_rng()
303+
idx = rng.integers(low=0, high=d, size=(d // 4,))
304+
nparr = arr[:]
305+
b = arr[idx]
306+
n = nparr[idx]
307+
np.testing.assert_allclose(b, n)
309308

310309
ndim = 3
311-
# d = 1 + int((blosc2.MAX_FAST_PATH_SIZE / 8) ** (1 / ndim)) # just over fast path size
310+
d = 1 + int((blosc2.MAX_FAST_PATH_SIZE / 8) ** (1 / ndim)) # just over fast path size
312311
shape = (d,) * ndim
313312
arr = blosc2.linspace(0, 100, num=np.prod(shape), shape=shape, dtype=dtype)
314313
rng = np.random.default_rng()

0 commit comments

Comments
 (0)