Skip to content

Commit

Permalink
Fix gpuci: np.product is deprecated (#8518)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky authored Feb 22, 2024
1 parent a5a6e99 commit e6fe6f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion distributed/protocol/tests/test_cupy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@pytest.mark.parametrize("order", ["C", "F"])
@pytest.mark.parametrize("serializers", [("cuda",), ("dask",), ("pickle",)])
def test_serialize_cupy(shape, dtype, order, serializers):
x = cupy.arange(numpy.product(shape), dtype=dtype)
x = cupy.arange(numpy.prod(shape), dtype=dtype)
x = cupy.ndarray(shape, dtype=x.dtype, memptr=x.data, order=order)
header, frames = serialize(x, serializers=serializers)
y = deserialize(header, frames, deserializers=serializers)
Expand Down
2 changes: 1 addition & 1 deletion distributed/protocol/tests/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_serialize_numba(shape, dtype, order, serializers):
if not cuda.is_available():
pytest.skip("CUDA is not available")

ary = np.arange(np.product(shape), dtype=dtype)
ary = np.arange(np.prod(shape), dtype=dtype)
ary = np.ndarray(shape, dtype=ary.dtype, buffer=ary.data, order=order)
x = cuda.to_device(ary)
header, frames = serialize(x, serializers=serializers)
Expand Down

0 comments on commit e6fe6f2

Please sign in to comment.