Skip to content

Commit 91ba6b8

Browse files
committed
MAINT: return correct dtype for non-decimals in _value_like
1 parent 4f886df commit 91ba6b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy_financial/_financial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _value_like(arr, value):
307307
if isinstance(entry, Decimal):
308308
return Decimal(value)
309309
else:
310-
return value
310+
return np.array(value, dtype=arr.dtype).item(0)
311311

312312

313313
def ipmt(rate, per, nper, pv, fv=0, when='end'):

0 commit comments

Comments
 (0)