Conversation
e3a23f4 to
43cf077
Compare
OverflowError: Python int too large to convert to C long raised during annotation label map creation with custom labels.
|
Pandas is Greek to me. What is the issue this is trying to solve?
What integer value is too large to convert to long? Annotation *type codes* can't be too large; those must be between 1 and 49.
|
|
@bemoody this is to fix the test error currently seen in #544. My understanding is that this is a known issue when Pandas tries to unify data types. Here is the explanation (along with the full test error): WFDB’s own constraints keep label_store small (1–49), so it isn’t your annotation values that are “too big.” The overflow comes from pandas’ internal attempt to unify dtypes when a row assignment ends up behaving like an append under the hood. On some platforms/pandas versions, that path tries to convert Python ints through a C long and can raise OverflowError even if your data are reasonable. |
|
The problem seems to be related to I'd suggest that we've gotten what benefit we can out of As for |
|
@bemoody , thanks for looking into this. It does seem like it is probably related to pandas-dev/pandas#60023. I'd be fine with removing |
As discussed in #548, we need to fix a failing test. This PR removes the global `NPY_PROMOTION_STATE: weak_and_warn` environment variable and applies it only to the `test-deb11-i386` job where overflow errors are most likely to occur in the 32-bit environment. Addresses test overflow errors seen in #544. Note that the `test-deb11-i386` job is not failing.
|
This was resolved with #552 |
The patch makes the label‑store dtype explicit (int64) and replaces row‑wise .loc assignment with a keyed, vectorized update.