8000 np.pmt causing unnecessary warnings · Issue #5046 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
np.pmt causing unnecessary warnings #5046
Closed
@alkarimlalani

Description

@alkarimlalani

Sometimes when using the np.pmt I enter 0.0 as an interest rate like so:

np.pmt(0.0, 180, 20000)

According to the documentation at http://docs.scipy.org/doc/numpy/reference/generated/numpy.pmt.html there is no restriction against a rate of 0 and the notes section in the docs even address the use case where rate = 0.

Yet every time I run the function with rate set to 0.0 I get the following warning:

Warning: invalid value encountered in double_scalars

I looked at the source and understand why its throwing the warning, but it really shouldn't since 0 is a valid rate and should handle that case differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0