@@ -83,6 +83,8 @@ def test_coerced_usm_types_remainder(usm_type_x, usm_type_y):
83
83
y = dp .arange (100 , usm_type = usm_type_y ).reshape (10 , 10 )
84
84
y = y .T + 1
85
85
86
+ z = 100 % y
87
+ z = y % 7
86
88
z = x % y
87
89
88
90
# inplace remainder
@@ -94,6 +96,27 @@ def test_coerced_usm_types_remainder(usm_type_x, usm_type_y):
94
96
assert z .usm_type == du .get_coerced_usm_type ([usm_type_x , usm_type_y ])
95
97
96
98
99
+ @pytest .mark .parametrize ("usm_type_x" , list_of_usm_types , ids = list_of_usm_types )
100
+ @pytest .mark .parametrize ("usm_type_y" , list_of_usm_types , ids = list_of_usm_types )
101
+ def test_coerced_usm_types_floor_divide (usm_type_x , usm_type_y ):
102
+ x = dp .arange (100 , usm_type = usm_type_x ).reshape (10 , 10 )
103
+ y = dp .arange (100 , usm_type = usm_type_y ).reshape (10 , 10 )
104
+ x = x + 1.5
105
+ y = y .T + 0.5
106
+
107
+ z = 3.4 // y
108
+ z = y // 2.7
109
+ z = x // y
110
+
111
+ # inplace floor_divide
112
+ z //= y
113
+ z //= 2.5
114
+
115
+ assert x .usm_type == usm_type_x
116
+ assert y .usm_type == usm_type_y
117
+ assert z .usm_type == du .get_coerced_usm_type ([usm_type_x , usm_type_y ])
118
+
119
+
97
120
@pytest .mark .parametrize ("usm_type_x" , list_of_usm_types , ids = list_of_usm_types )
98
121
@pytest .mark .parametrize ("usm_type_y" , list_of_usm_types , ids = list_of_usm_types )
99
122
def test_coerced_usm_types_power (usm_type_x , usm_type_y ):
0 commit comments