File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,25 @@ def test_coerced_usm_types_remainder(usm_type_x, usm_type_y):
94
94
assert z .usm_type == du .get_coerced_usm_type ([usm_type_x , usm_type_y ])
95
95
96
96
97
+ @pytest .mark .parametrize ("usm_type_x" , list_of_usm_types , ids = list_of_usm_types )
98
+ @pytest .mark .parametrize ("usm_type_y" , list_of_usm_types , ids = list_of_usm_types )
99
+ def test_coerced_usm_types_floor_divide (usm_type_x , usm_type_y ):
100
+ x = dp .arange (100 , usm_type = usm_type_x ).reshape (10 , 10 )
101
+ y = dp .arange (100 , usm_type = usm_type_y ).reshape (10 , 10 )
102
+ x = x + 1.5
103
+ y = y .T + 0.5
104
+
105
+ z = x // y
106
+
107
+ # inplace floor_divide
108
+ z //= y
109
+ z //= 2.5
110
+
111
+ assert x .usm_type == usm_type_x
112
+ assert y .usm_type == usm_type_y
113
+ assert z .usm_type == du .get_coerced_usm_type ([usm_type_x , usm_type_y ])
114
+
115
+
97
116
@pytest .mark .parametrize ("usm_type_x" , list_of_usm_types , ids = list_of_usm_types )
98
117
@pytest .mark .parametrize ("usm_type_y" , list_of_usm_types , ids = list_of_usm_types )
99
118
def test_coerced_usm_types_power (usm_type_x , usm_type_y ):
You can’t perform that action at this time.
0 commit comments