title: Calculating IRR of a perpetuity with numpy / python
body: <p>I am using numpy library for doing simple IRR calculations using the irr function. So for example, if I want to find the IRR of a cash flow, I do the following </p>
  
  <pre><code>In [16]:
     import numpy as np 
     cf = np.array([-100,10,10,100])
     print np.irr(a)
  
  0.0688601791248
  </code></pre>
  
  <p>But, I am looking for a way to do the NPV for a perpetuity. My cash flow would be -100, 10....</p>
  
  <p>Has anyone done this before</p>