Commit f647a5c
Fix Coordinates.to_index performance regression
The codes passed to pd.MultiIndex were being converted from cache-friendly
ndarrays into Python lists to silence a mypy arg-type error introduced in
pydata#10694. The extra per-element conversion dominates runtime for large indexes
(~13s on a 100x2000x300 array). Pass the ndarrays directly and suppress the
type error the same way as for `levels` just above.
Fixes pydata#11305
Co-authored-by: Claude <noreply@anthropic.com>1 parent f7e47a1 commit f647a5c
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
0 commit comments