-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
DEP: deprecate financial functions. #14720
Conversation
9ee5dc0
to
ac2bbe8
Compare
ac2bbe8
to
c38fc91
Compare
numpy/lib/financial.py
Outdated
def _pmt_dispatcher(rate, nper, pv, fv=None, when=None): | ||
warnings.warn('pmt is deprecated and will be removed from NumPy 1.20.', | ||
DeprecationWarning, stacklevel=3) | ||
return (rate, nper, pv, fv) |
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.
@shoyer: Is the dispatcher the right place for this? What if array_function
is disabled via the env var (if that still exists)?
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.
FWIW: This is how asscalar
is deprecated:
Line 551 in 1185880
def _asscalar_dispatcher(a): |
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.
That seems to answer the question and looks fine. @shoyer did that asscalar
deprecation in the same way says git blame.
What if
array_function
is disabled via the env var (if that still exists)?
That only still exists as an escape hatch in case of unexpected issues with the mechanism, it shouldn't be used otherwise. No need to worry about that I'd say, since even if it is used the impact is very minor.
c38fc91
to
9355175
Compare
As per NEP-32, the financial functions are deprecated.
9355175
to
6a3dc5d
Compare
Merged, thanks @WarrenWeckesser! |
As per NEP-32, the financial functions are deprecated.