8000 financial.pmt modifies input · Issue #8055 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
financial.pmt modifies input #8055
Closed
Closed
@jblackma

Description

@jblackma

Whenever an array of rates is passed into np.pmt, all zeros in the array are converted to 1:

>>> import numpy as np
>>> print np.__version__
1.11.0
>>> rates = np.array([0., 0.5])
>>> print np.pmt(rates, 5, 1.0)
[-0.2        -0.57582938]
>>> print rates
[ 1.   0.5]

This is done internally in np.pmt to avoid dividing by zero, but it should be done in a way that does not modify the input arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0