8000 BUG: pmt() method of financial.py will yield error because the two param... by liufei11111 · Pull Request #5263 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: pmt() method of financial.py will yield error because the two param... #5263

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

Closed
wants to merge 1 commit into from

Conversation

liufei11111
Copy link
Contributor

...eters passed in to np.where() is evaluated first before going into the function however, the denominator can be zero at that time. I allocated the intermediate result based on different formulas for rate == 0.0 and not equal to and fixes #5046. Also, a easy fix for asocial doesn’t take integer because it assumes passing in an np.array. I convert everything to np.array first and then retrieve the item. Fixed #4701

@liufei11111
Copy link
Contributor Author

Hi, I recreated this fix because my previous fix is outdated and fall behind the tip of current directory. Thanks.

@liufei11111 liufei11111 force-pushed the feiliu branch 2 times, most recently from af91c17 to 70f29b6 Compare November 6, 2014 04:40
@@ -88,7 +88,12 @@ def test_basic(self):
assert_(np.isscalar(3j))
assert_(np.isscalar(long(10)))
assert_(np.isscalar(4.0))
class TestAsscalar(TestCase):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need two blank lines before this.

@liufei11111 liufei11111 force-pushed the feiliu branch 2 times, most recently from da93986 to 7d7746c Compare November 6, 2014 21:19
…rameters passed in to np.where() is evaluated first before going into the function however, the denominator can be zero at that time. I allocated the intermediate result based on different formulas for rate == 0.0 and not equal to and fixes numpy#5046. Also, a easy fix for asocial doesn’t take integer because it assumes passing in an np.array. I convert everything to np.array first and then retrieve the item. Fixed numpy#4701
@liufei11111
Copy link
Contributor Author

Hi, I corrected the comments. Please check again. Thanks.

@charris
Copy link
Member
charris commented Feb 17, 2015

Cleaned up in #5577, so closing this. Thanks @liufei11111.

@charris charris closed this Feb 17, 2015
charris referenced this pull request Feb 18, 2015
BUG: financial.pmt warns of zero divide when rate == 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

np.pmt causing unnecessary warnings np.asscalar should pass through scalars
3 participants
0