Skip to content

Commit 2886d1b

Browse files
committed
test: pass dtype directly to empty_like instead of casting
1 parent e32c57d commit 2886d1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numba_cuda/numba/cuda/tests/cudapy/test_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def unary_template_uint64(self, func, npfunc, start=0, stop=50):
238238
def unary_template(self, func, npfunc, npdtype, nprestype, start, stop):
239239
nelem = 50
240240
A = np.linspace(start, stop, nelem, dtype=npdtype)
241-
B = np.empty_like(A).astype(nprestype)
241+
B = np.empty_like(A, dtype=nprestype)
242242
arytype = numpy_support.from_dtype(npdtype)[::1]
243243
restype = numpy_support.from_dtype(nprestype)[::1]
244244
cfunc = cuda.jit((arytype, restype))(func)

0 commit comments

Comments
 (0)