From 7c8043e19f5b35df153e8a5057f6f1db92b43dde Mon Sep 17 00:00:00 2001 From: KhaledTo Date: Sun, 18 Sep 2016 22:00:24 -0400 Subject: [PATCH] BUG : financial.pmt modifies input (issue #8055) --- numpy/lib/financial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/lib/financial.py b/numpy/lib/financial.py index f1a1a4287fff..931b0af5658b 100644 --- a/numpy/lib/financial.py +++ b/numpy/lib/financial.py @@ -207,7 +207,7 @@ def pmt(rate, nper, pv, fv=0, when='end'): """ when = _convert_when(when) - (rate, nper, pv, fv, when) = map(np.asarray, [rate, nper, pv, fv, when]) + (rate, nper, pv, fv, when) = map(np.array, [rate, nper, pv, fv, when]) temp = (1 + rate)**nper mask = (rate == 0.0) np.copyto(rate, 1.0, where=mask)