Commit ec72ed1
BUGFIX: rank with object dtype and small values #62036
Changes :
- Removed the Cython helper function `are_diff` since a direct comparison would suffice. This removes tolerance/error based float equality under object dtype.
- Also, removed the special-case path for `numeric_object_t is object` and used a single comparison for both types. This aligns ranking semantics with Python equality across dtypes.
- Near-equal floats previously collapsed by FP_ERR will no longer tie when ranking object-dtype Series.1 parent 7bfef3b commit ec72ed1
File tree
3 files changed
+13
-14
lines changed- doc/source/whatsnew
- pandas
- _libs
- tests
3 files changed
+13
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
| 1125 | + | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
| |||
1135 | 1127 | | |
1136 | 1128 | | |
1137 | 1129 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
| 1130 | + | |
| 1131 | + | |
1144 | 1132 | | |
1145 | 1133 | | |
1146 | 1134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1809 | 1809 | | |
1810 | 1810 | | |
1811 | 1811 | | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1812 | 1822 | | |
1813 | 1823 | | |
1814 | 1824 | | |
| |||
0 commit comments