Skip to content
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

Merged
merged 2 commits into from
Oct 18, 2019
Merged

Conversation

WarrenWeckesser
Copy link
Member

As per NEP-32, the financial functions are deprecated.

numpy/lib/financial.py Outdated Show resolved Hide resolved
Comment on lines 153 to 160
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)
Copy link
Member

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)?

Copy link
Member Author

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:

def _asscalar_dispatcher(a):

Copy link
Member

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.

@rgommers rgommers changed the title MAINT: deprecate financial functions. DEP: deprecate financial functions. Oct 18, 2019
@rgommers rgommers merged commit b6a05c3 into numpy:master Oct 18, 2019
@rgommers
Copy link
Member

Merged, thanks @WarrenWeckesser!

@WarrenWeckesser WarrenWeckesser deleted the dep-fin branch October 18, 2019 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants