Fix numpy and pandas compatibility#475
Open
martin-springer wants to merge 59 commits intodevelopmentfrom
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #475 +/- ##
===============================================
- Coverage 96.22% 96.14% -0.09%
===============================================
Files 12 12
Lines 2279 2280 +1
===============================================
- Hits 2193 2192 -1
- Misses 86 88 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@mdeceglie - Commit 87d2b63 simplified the tz handling. Tests are already extensive with tz-naive and tz-aware unit tests. All are passing. The simplification gets us closer to the original implementation. |
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.
This pull request focuses on improving compatibility with recent versions of pandas (3.0+), numpy (2.x), and xgboost (3.x), while also removing deprecated normalization functions and addressing several minor bugs and deprecations. The main changes involve updating internal calculations to be resolution-agnostic, cleaning up deprecated code, and ensuring the codebase works with the latest dependencies.
Dependency and compatibility updates:
pandasandnumpyinsetup.pyto support pandas 3.0 and numpy 2.x; updated related requirements and changelog documentation.normalization.pyby replacing.view('int64')with.total_seconds()for datetime calculations, making code resolution-agnostic and robust to changes in pandas datetime resolution. [1] [2] [3] [4] [5] [6]soiling.pyby using.item()and explicit indexing for scalar extraction, and replaced deprecated implicit conversions. [1] [2]Deprecations and removals:
normalization.delta_indexandnormalization.check_series_frequencyfunctions (deprecated since v2.0.0); their private helpers remain for internal use. [1] [2] [3] [4]Bug fixes and minor enhancements:
normalization.interpolate()so output matches input resolution (e.g., microseconds vs nanoseconds).filtering.xgboost_clip_filter()by usingxgb.DMatrixwith explicit feature names for model prediction. [1] [2]'d'to uppercase'D'and usingaxis=keyword for DataFrame aggregation methods. [1] [2] [3] [4] [5]Issues
Closes #472
Closes #445
These changes collectively ensure that the codebase remains compatible with the latest versions of key dependencies and removes legacy code, while also addressing minor bugs and improving code clarity.- [ ] Code changes are covered by tests
[ ] Code changes have been evaluated for compatibility/integration with TrendAnalysis[ ] New functions added to__init__.py[ ] Example notebooks are rerun and differences in results scrutinized