Skip to content

Commit 18b83af

Browse files
committed
Fix affected type check of input array f
1 parent 0513ce6 commit 18b83af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpnp/dpnp_iface_mathematical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2710,7 +2710,7 @@ def gradient(f, *varargs, axis=None, edge_order=1):
27102710
# First check if f is a dpnp integer type; if so, convert f to default
27112711
# float type to avoid modular arithmetic when computing changes in f.
27122712
otype = dpnp.default_float_type(sycl_queue=f.sycl_queue)
2713-
if dpnp.issubdtype(otype, dpnp.integer):
2713+
if dpnp.issubdtype(f.dtype, dpnp.integer):
27142714
f = f.astype(otype)
27152715

27162716
for axis_, ax_dx in zip(axes, dx):

0 commit comments

Comments
 (0)