@@ -2020,9 +2020,7 @@ def test_out_dtype(self, func):
20202020 fn (* args , out = out , dtype = "f4" )
20212021
20222022 @pytest .mark .parametrize ("xp" , [numpy , dpnp ])
2023- @pytest .mark .parametrize (
2024- "func" , ["abs" , "fix" , "round" , "add" , "frexp" , "divmod" ]
2025- )
2023+ @pytest .mark .parametrize ("func" , ["abs" , "round" , "add" , "frexp" , "divmod" ])
20262024 def test_out_wrong_tuple_len (self , xp , func ):
20272025 if func == "round" and xp is numpy :
20282026 pytest .skip ("numpy.round(x, out=(...)) is not supported" )
@@ -2607,6 +2605,15 @@ def test_out_usm_ndarray(self, func, dt):
26072605 assert result .get_array () is usm_out
26082606 assert_array_equal (result , expected )
26092607
2608+ @pytest .mark .parametrize ("xp" , [numpy , dpnp ])
2609+ def test_out_wrong_tuple_len (self , xp , func ):
2610+ a = xp .array ([1.1 , - 2.9 , 3.5 ])
2611+
2612+ out1 = xp .empty_like (a )
2613+ out2 = xp .empty_like (a )
2614+
2615+ assert_raises (ValueError , getattr (xp , func ), a , out = (out1 , out2 ))
2616+
26102617 @pytest .mark .parametrize ("xp" , [numpy , dpnp ])
26112618 @pytest .mark .parametrize (
26122619 "shape" , [(0 ,), (15 ,), (2 , 2 )], ids = ["(0,)" , "(15,)" , "(2, 2)" ]
0 commit comments