Skip to content

Commit 6675ca8

Browse files
Add test_inplace_scalar to TestFloorDivideRemainder
1 parent c30be6b commit 6675ca8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dpnp/tests/test_binary_ufuncs.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,17 @@ def test_inplace_strides(self, func, dtype):
320320

321321
assert_dtype_allclose(ia, a)
322322

323+
@pytest.mark.parametrize("dtype", ALL_DTYPES)
324+
def test_inplace_scalar(self, func, dtype):
325+
326+
a = numpy.array(10, dtype=dtype)
327+
self.do_inplace_op(10, a, func)
328+
329+
ia = dpnp.array(10, dtype=dtype)
330+
self.do_inplace_op(10, ia, func)
331+
332+
assert_dtype_allclose(ia, a)
333+
323334
@pytest.mark.parametrize("dtype1", [dpnp.bool] + ALL_DTYPES)
324335
@pytest.mark.parametrize("dtype2", get_float_dtypes())
325336
def test_inplace_dtype(self, func, dtype1, dtype2):

0 commit comments

Comments
 (0)