-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
ipmt()
and ppmt()
do not accept an array as per
#21
Comments
It seems the same applies to |
ipmt()
does not accept an array as per
ipmt()
/ppmt()
do not accept an array as per
ipmt()
/ppmt()
do not accept an array as per
ipmt()
/ ppmt()
do not accept an array as per
ipmt()
/ ppmt()
do not accept an array as per
ipmt()
and ppmt()
do not accept an array as per
@Peque , the same applies to all functions :) You can easily bypass this limitation by using "numpy.vectorize": >>> ipmt = numpy.vectorize(pyxirr.ipmt)
>>> ipmt(rate=0.03 / 12, per=numpy.arange(35) + 1, nper=35, pv=10000)
array([-25. , -24.3156167 .... However, numpy.vectorize is likely to run slower than list comprehension: >>> [pyxirr.ipmt(rate=0.03 / 12, per=per + 1, nper=35, pv=10000) for per in range(35)] |
@Anexen Thanks for the clarification! 😊 |
I finally managed to get this to work! I think I have developed an approach and will add vectorized versions of functions in the foreseeable future (probably by the end of March). |
It seems that is fine with
numpy_financial
:However, with
pyxirr
:Not sure if it is related or not, but the returned type when not using an array is also different:
The text was updated successfully, but these errors were encountered: