We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d79022b commit cd309f0Copy full SHA for cd309f0
dpnp/tests/test_binary_two_outputs_ufuncs.py
@@ -335,3 +335,25 @@ def test_special_int(self, dt):
335
exp1, exp2 = numpy.divmod(a, b)
336
assert_array_equal(res1, exp1)
337
assert_array_equal(res2, exp2)
338
+
339
+ @pytest.mark.filterwarnings("ignore::RuntimeWarning")
340
+ @pytest.mark.parametrize("dt", get_float_dtypes())
341
+ def test_float_zero(self, dt):
342
+ a = numpy.array([1, 0, -2], dtype=dt)
343
+ ia = dpnp.array(a)
344
345
+ res1, res2 = dpnp.divmod(ia, 0)
346
+ exp1, exp2 = numpy.divmod(a, 0)
347
+ assert_array_equal(res1, exp1)
348
+ assert_array_equal(res2, exp2)
349
350
351
+ def test_float_diff_signs(self, dt):
352
+ a = numpy.arange(-3, 7, dtype=dt).reshape((10, 1))
353
+ b = numpy.array([[2, -2, 3, -3]])
354
+ ia, ib = dpnp.array(a), dpnp.array(b)
355
356
+ res1, res2 = dpnp.divmod(ia, ib)
357
+ exp1, exp2 = numpy.divmod(a, b)
358
359
0 commit comments