Net present value
The net present value is defined as the sum of all the present value cash flows. The NumPy npv
function returns the net present value of cash flows. The function requires two arguments, the rate and an array representing the cash flows.