|
31 | 31 | ((np.float16, np.float32), np.float32), |
32 | 32 | ((np.float16, np.int16), np.float32), |
33 | 33 | ((np.float32, np.int16), np.float32), |
34 | | - ((np.uint64, np.int64), np.float64), |
35 | 34 | ((np.int16, np.float64), np.float64), |
36 | 35 | ((np.float16, np.int64), np.float64), |
37 | 36 | # Into others. |
38 | 37 | ((np.complex128, np.int32), np.complex128), |
39 | 38 | ((object, np.float32), object), |
40 | 39 | ((object, np.int16), object), |
| 40 | + # GH 59609 |
| 41 | + # Float point precision error when converting int64 and uint64 |
| 42 | + ((np.uint64, np.int64), object), |
41 | 43 | # Bool with int. |
42 | 44 | ((np.dtype("bool"), np.int64), object), |
43 | 45 | ((np.dtype("bool"), np.int32), object), |
@@ -156,8 +158,17 @@ def test_interval_dtype(left, right): |
156 | 158 | # i.e. numeric |
157 | 159 | if right.subtype.kind in ["i", "u", "f"]: |
158 | 160 | # both numeric -> common numeric subtype |
159 | | - expected = IntervalDtype(np.float64, "right") |
160 | | - assert result == expected |
| 161 | + if ( |
| 162 | + left.subtype.kind == "i" |
| 163 | + and right.subtype.kind == "u" |
| 164 | + or left.subtype.kind == "u" |
| 165 | + and right.subtype.kind == "i" |
| 166 | + ): |
| 167 | + assert result == object |
| 168 | + else: |
| 169 | + expected = IntervalDtype(np.float64, "right") |
| 170 | + assert result == expected |
| 171 | + |
161 | 172 | else: |
162 | 173 | assert result == object |
163 | 174 |
|
|
0 commit comments