-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take care of deprecation warnings from dependencies #482
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
==========================================
+ Coverage 92.98% 92.99% +0.01%
==========================================
Files 193 194 +1
Lines 14638 14649 +11
==========================================
+ Hits 13611 13623 +12
+ Misses 1027 1026 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me -- just a couple of small remarks!
In this PR, we take care of deprecation warnings from estimagic's dependencies.
In particular, we
df.map()
instead ofdf.applymap()
if pandas version 2.1.0 or greater is installedcompat.py
, in which we implement functions with compatibility issuesnp.prod
instead ofnp.product
, which is deprecated with numpy version 1.25.0 (see release notes here. In earlier versions of numpynp.prod
was already implemented andnp.product
would simply callnp.prod
; therefore we can just swapnp.product
fornp.prod
. (There were some subtle differences, but they do not apply to our use cases; see here)pd.Series(list).unique()
instead ofpd.unique(list)
, as the latter ist deprecated. Also usepd.Series(list).value_counts()
instead ofpd.value_counts(list)
.maxiter
option fromscipy_truncated_newton
algorithm, since it is not a valid option.DataFrame.replace()
properly for categorical columns. The old implementation raised the following errors:Current solution: Ignore the warning.
Closes #470.