Skip to content
Snippets Groups Projects
Commit 0f5a53ab authored by Matthias Diener's avatar Matthias Diener Committed by Andreas Klöckner
Browse files

test_maximum_minimum_with_scalars: test unsized scalars

parent dfd84c36
Branches sym-dtype
No related tags found
No related merge requests found
......@@ -2054,6 +2054,23 @@ def test_maximum_minimum_with_scalars(ctx_factory):
result = cl_array.minimum(a_cl, b_cl, queue=cq)
np.testing.assert_allclose(result.get(), b_np)
# Test 'untyped' scalars
# FIXME: these don't work with unsized ints
result = cl_array.minimum(4.0, b_cl, queue=cq)
np.testing.assert_allclose(result.get(), b_np)
result = cl_array.maximum(4.0, b_cl, queue=cq)
np.testing.assert_allclose(result.get(), a_np)
result = cl_array.minimum(b_cl, 4.0, queue=cq)
np.testing.assert_allclose(result.get(), b_np)
result = cl_array.maximum(b_cl, 4.0, queue=cq)
np.testing.assert_allclose(result.get(), a_np)
result = cl_array.minimum(-3.0, 4.0, queue=cq)
np.testing.assert_allclose(result, b_np)
result = cl_array.maximum(-3.0, 4.0, queue=cq)
np.testing.assert_allclose(result, a_np)
# }}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment