@@ -1122,67 +1122,67 @@ def test_ufunc_coercions(self, index_or_series, dtype):
1122
1122
box = index_or_series
1123
1123
1124
1124
result = np .sqrt (idx )
1125
+ assert isinstance (result , box )
1125
1126
if result .dtype .kind == "c" :
1126
- assert result .dtype == dtype and isinstance (result , box )
1127
1127
exp_dtype = dtype
1128
1128
else :
1129
- assert result .dtype == "f8" and isinstance ( result , box )
1129
+ # assert result.dtype == "f8"
1130
1130
exp_dtype = np .float64
1131
1131
exp = Index (np .sqrt (np .array ([1 , 2 , 3 , 4 , 5 ], dtype = exp_dtype )), name = "x" )
1132
1132
exp = tm .box_expected (exp , box )
1133
1133
tm .assert_equal (result , exp )
1134
1134
1135
1135
result = np .divide (idx , 2.0 )
1136
+ assert isinstance (result , box )
1136
1137
if result .dtype .kind == "c" :
1137
- assert result .dtype == dtype and isinstance (result , box )
1138
1138
exp_dtype = dtype
1139
1139
else :
1140
- assert result .dtype == "f8" and isinstance ( result , box )
1140
+ # assert result.dtype == "f8"
1141
1141
exp_dtype = np .float64
1142
1142
exp = Index ([0.5 , 1.0 , 1.5 , 2.0 , 2.5 ], dtype = exp_dtype , name = "x" )
1143
1143
exp = tm .box_expected (exp , box )
1144
1144
tm .assert_equal (result , exp )
1145
1145
1146
1146
# _evaluate_numeric_binop
1147
1147
result = idx + 2.0
1148
+ isinstance (result , box )
1148
1149
if result .dtype .kind == "c" :
1149
- assert result .dtype == dtype and isinstance (result , box )
1150
1150
exp_dtype = dtype
1151
1151
else :
1152
- assert result .dtype == "f8" and isinstance ( result , box )
1152
+ # assert result.dtype == "f8"
1153
1153
exp_dtype = np .float64
1154
1154
exp = Index ([3.0 , 4.0 , 5.0 , 6.0 , 7.0 ], dtype = exp_dtype , name = "x" )
1155
1155
exp = tm .box_expected (exp , box )
1156
1156
tm .assert_equal (result , exp )
1157
1157
1158
1158
result = idx - 2.0
1159
+ isinstance (result , box )
1159
1160
if result .dtype .kind == "c" :
1160
- assert result .dtype == dtype and isinstance (result , box )
1161
1161
exp_dtype = dtype
1162
1162
else :
1163
- assert result .dtype == "f8" and isinstance ( result , box )
1163
+ # assert result.dtype == "f8"
1164
1164
exp_dtype = np .float64
1165
1165
exp = Index ([- 1.0 , 0.0 , 1.0 , 2.0 , 3.0 ], dtype = exp_dtype , name = "x" )
1166
1166
exp = tm .box_expected (exp , box )
1167
1167
tm .assert_equal (result , exp )
1168
1168
1169
1169
result = idx * 1.0
1170
+ isinstance (result , box )
1170
1171
if result .dtype .kind == "c" :
1171
- assert result .dtype == dtype and isinstance (result , box )
1172
1172
exp_dtype = dtype
1173
1173
else :
1174
- assert result .dtype == "f8" and isinstance ( result , box )
1174
+ # assert result.dtype == "f8"
1175
1175
exp_dtype = np .float64
1176
1176
exp = Index ([1.0 , 2.0 , 3.0 , 4.0 , 5.0 ], dtype = exp_dtype , name = "x" )
1177
1177
exp = tm .box_expected (exp , box )
1178
1178
tm .assert_equal (result , exp )
1179
1179
1180
1180
result = idx / 2.0
1181
+ isinstance (result , box )
1181
1182
if result .dtype .kind == "c" :
1182
- assert result .dtype == dtype and isinstance (result , box )
1183
1183
exp_dtype = dtype
1184
1184
else :
1185
- assert result .dtype == "f8" and isinstance ( result , box )
1185
+ # assert result.dtype == "f8"
1186
1186
exp_dtype = np .float64
1187
1187
exp = Index ([0.5 , 1.0 , 1.5 , 2.0 , 2.5 ], dtype = exp_dtype , name = "x" )
1188
1188
exp = tm .box_expected (exp , box )
0 commit comments