Book Image

NumPy: Beginner's Guide

By : Ivan Idris
Book Image

NumPy: Beginner's Guide

By: Ivan Idris

Overview of this book

Table of Contents (21 chapters)
NumPy Beginner's Guide Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
NumPy Functions' References
Index

Time for action – determining the number of periodic payments


Consider a loan of 9000 at a rate of 10 percent with fixed monthly payments of 100.

Find out how many payments are required with the NumPy nper() function:

print("Number of payments", np.nper(0.10/12, -100, 9000))

The number of payments:

Number of payments 167.047511801

What just happened?

We determined the number of payments needed to pay off a loan of 9000 with an interest rate of 10 percent and monthly payments of 100. The number of payments returned was 167.