Skip to content

Commit fb33afa

Browse files
committed
Make random array generation faster
1 parent 1b06eb9 commit fb33afa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bench/ndarray/compute_dists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
t0 = time()
6161
_ = np.random.random(shape)
6262
a = blosc2.fromiter(np.nditer(_), dtype=dtype, shape=shape, urlpath=urlpath['a'])
63-
b = blosc2.fromiter(np.nditer(_), dtype=dtype, shape=shape, urlpath=urlpath['b'])
63+
b = a.copy(urlpath=urlpath['b'])
6464
# This uses less memory, but it is 2x-3x slower
6565
# iter_ = (rng.random() for _ in range(i**2 * 2))
6666
# a = blosc2.fromiter(iter_, dtype=dtype, shape=shape, urlpath=urlpath['a'])

0 commit comments

Comments
 (0)