Skip to content

Commit

Permalink
use np.prod instead of np.product
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jun 19, 2023
1 parent 0cfc068 commit bd71da8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_enqueue_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def test_enqueue_copy_rect_2d(ctx_factory, honor_skip=True):
h_ary_in = rng.integers(0, 256, ary_in_shp, dtype=np.uint8)

# Create device buffers
d_in_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.product(buf_in_shp))
d_out_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.product(buf_out_shp))
d_in_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.prod(buf_in_shp))
d_out_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.prod(buf_out_shp))

# Copy sub-array (rectangular buffer) from host to device
cl.enqueue_copy(
Expand Down Expand Up @@ -166,8 +166,8 @@ def test_enqueue_copy_rect_3d(ctx_factory, honor_skip=True):
h_ary_in = rng.integers(0, 256, ary_in_shp, dtype=np.uint8)

# Create device buffers
d_in_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.product(buf_in_shp))
d_out_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.product(buf_out_shp))
d_in_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.prod(buf_in_shp))
d_out_buf = cl.Buffer(ctx, cl.mem_flags.READ_ONLY, size=np.prod(buf_out_shp))

# Copy sub-array (rectangular buffer) from host to device
cl.enqueue_copy(
Expand Down

0 comments on commit bd71da8

Please sign in to comment.