Draft: Modernize codebase for Pandas 2.2+ and NumPy 2.0+ compatibility#19
Draft
andrewendlinger wants to merge 2 commits intoHawkMRS:mainfrom
Draft
Draft: Modernize codebase for Pandas 2.2+ and NumPy 2.0+ compatibility#19andrewendlinger wants to merge 2 commits intoHawkMRS:mainfrom
andrewendlinger wants to merge 2 commits intoHawkMRS:mainfrom
Conversation
Removes float32 downcasting in `safe_convert_to_numeric` and ensures numeric columns are cast to float64 in `unitconverter`. This resolves a `LossySetitemError` in pandas 2.2+ caused by attempting to insert float64 constants (e.g., `np.pi`) into float32 columns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #17 (Long-term solution)
What does this PR do?
This Draft PR begins the process of refactoring the codebase to comply with the strict type-enforcement and Copy-on-Write behaviors introduced in recent versions of Pandas (>= 2.2.0) and NumPy (>= 2.0.0), as well as modern
lmfit/astevalversions.This is the long-term solution to the temporary dependency pins implemented in #18 .
Feel free to push commits directly to this branch or let me know if anyone wants to take the lead on finishing this!