Skip to content

fix: pin pandas and numpy to prevent strict typing crashes#18

Open
andrewendlinger wants to merge 1 commit intoHawkMRS:mainfrom
andrewendlinger:hotfix/pin-dependencies
Open

fix: pin pandas and numpy to prevent strict typing crashes#18
andrewendlinger wants to merge 1 commit intoHawkMRS:mainfrom
andrewendlinger:hotfix/pin-dependencies

Conversation

@andrewendlinger
Copy link
Contributor

@andrewendlinger andrewendlinger commented Feb 20, 2026

Resolves #17

What does this PR do?
Restricts the allowed versions of pandas (< 2.2.0) and numpy (< 2.0.0) in the package dependencies.

Why is this necessary?
Recent releases of Pandas and NumPy introduced strict type-enforcement and removed implicit upcasting. This causes the current pyAMARES codebase to crash with LossySetitemError (during unit conversions) and AttributeError (when manipulating empty DataFrames resulting from peak filtering).

By pinning these dependencies to their last known stable versions, we immediately restore usability for end-users (at least python 3.11 and 3.12 it seems) while we can work on a comprehensive codebase update in a separate PR.

Pins pandas to <2.2.0 and numpy to <2.0.0 in package requirements.
Recent updates to these libraries introduced strict type enforcement
(e.g., preventing implicit upcasting), which causes LossySetitemError
and empty DataFrame AttributeErrors during standard pyAMARES workflows.
This temporary restriction restores immediate stability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes with Pandas 2.2+ and NumPy 2.0+ due to strict type enforcement

1 participant