Skip to content

Commit afb20b0

Browse files
committed
Add a test with scalar exp of bool type
1 parent a107236 commit afb20b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_mathematical.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,11 @@ def test_strides(self, stride, dt):
13491349
expected = numpy.ldexp(mant[::stride], exp[::stride], out=out[::stride])
13501350
assert_equal(result, expected)
13511351

1352+
def test_bool_exp(self):
1353+
result = dpnp.ldexp(3.7, dpnp.array(True))
1354+
expected = numpy.ldexp(3.7, numpy.array(True))
1355+
assert_almost_equal(result, expected)
1356+
13521357
@pytest.mark.parametrize("xp", [dpnp, numpy])
13531358
def test_uint64_exp(self, xp):
13541359
x = xp.array(4, dtype=numpy.uint64)

0 commit comments

Comments
 (0)