Skip to content

Commit 4bf57c6

Browse files
committed
replace xp.arange with np.arange.
1 parent 5c0889d commit 4bf57c6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_funcs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_1D_shapes(
311311
xp: ModuleType,
312312
):
313313
n = math.prod(input_shape)
314-
x = xp.reshape(xp.arange(n), input_shape)
314+
x = xp.asarray(np.arange(n).reshape(input_shape))
315315
y = atleast_nd(x, ndim=ndim)
316316

317317
assert y.shape == expected_shape
@@ -350,7 +350,7 @@ def test_2D_shapes(
350350
xp: ModuleType,
351351
):
352352
n = math.prod(input_shape)
353-
x = xp.reshape(xp.arange(n), input_shape)
353+
x = xp.asarray(np.arange(n).reshape(input_shape))
354354
y = atleast_nd(x, ndim=ndim)
355355

356356
assert y.shape == expected_shape
@@ -389,7 +389,7 @@ def test_3D_shapes(
389389
xp: ModuleType,
390390
):
391391
n = math.prod(input_shape)
392-
x = xp.reshape(xp.arange(n), input_shape)
392+
x = xp.asarray(np.arange(n).reshape(input_shape))
393393
y = atleast_nd(x, ndim=ndim)
394394

395395
assert y.shape == expected_shape
@@ -428,7 +428,7 @@ def test_5D_shapes(
428428
xp: ModuleType,
429429
):
430430
n = math.prod(input_shape)
431-
x = xp.reshape(xp.arange(n), input_shape)
431+
x = xp.asarray(np.arange(n).reshape(input_shape))
432432
y = atleast_nd(x, ndim=ndim)
433433

434434
assert y.shape == expected_shape

0 commit comments

Comments
 (0)