question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

np.pmt causing unnecessary warnings

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
argriffingcommented, Sep 4, 2014

what a strange function to have in numpy…

0reactions
Kai-Striegacommented, Jun 29, 2019

I think that should be closed too. It tries to fix the same issue (this one) also the last comment (https://github.com/numpy/numpy/pull/6073#issuecomment-248061826) is nearly three years old:

☔️ The latest upstream changes (presumably #8050) made this pull request unmergeable. Please resolve the merge conflicts.

I think we won’t see further changes any time soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NumPy 1.20.0 Release Notes
Previously the non-empty index [20] was not checked for correctness. It will now be checked causing a deprecation warning which will be turned...
Read more >
Vitamin or mineral supplements for premenstrual syndrome
Dopamine imbalance can affect mood and can lead to overwhelming anxiety (Li 2001). Previous studies have reported decreased circulating ...
Read more >
Telehealth for the Treatment of Serious Mental Illness and ...
causes clinically significant impairment, including health problems, disability, and failure to meet major responsibilities at work, school, or home.4.
Read more >
PHOTOMULTIPLIER TUBES - Hamamatsu Photonics
Photomultiplier tubes (often abbreviated as PMT) make use of ... containing a very small amount of potassium (K40) which may cause unwanted background....
Read more >
Avoidance of Unnecessary Dose to Patients While ...
The emitted light is directed to a photomultiplier tube (PMT) and the PMT ... initially was, causing loss of contrast if improperly collimated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found