3
���h#{ �
@ s� d Z ddlZddlmZ ddlZddlZddlmZ dZ ej
ejdd�Zdd d
ddd
ddddg
Zdddddddddd� Z
dd� Zd:dd�Zee�d;dd��Zd<dd�Zee�d=dd ��Zd>dd�Zee�d?dd
��Zd@d d!�Zee�dAd"d��Zd#d$� ZdBd%d&�Zee�dCd'd��ZdDd(d)�Zee�dEd*d
��Zd+d,� ZdFd-d.�Zee�dGd0d��Zd1d2� Zee�d3d� �Z d4d5� Z!ee!�d6d� �Z"d7d8� Z#ee#�d9d� �Z$dS )HaK Some simple financial calculations
patterned after spreadsheet computations.
There is some complexity in each function
so that the functions behave like ufuncs with
broadcasting and being able to be called with scalars
or arrays (or other sequences).
Functions support the :class:`decimal.Decimal` type unless
otherwise stated.
� N)�Decimal)� overridesz�numpy.{name} is deprecated and will be removed from NumPy 1.20. Use numpy_financial.{name} instead (https://pypi.org/project/numpy-financial/).�numpy)�module�fv�pmt�nper�ipmt�ppmt�pv�rate�irr�npv�mirr� ) �end�begin�e�br r Z beginning�start�finishc C s@ t | tj�r| S yt| S ttfk
r: dd� | D �S X d S )Nc S s g | ]}t | �qS � )�_when_to_num)�.0�xr r �4/tmp/pip-build-5_djhm0z/numpy/numpy/lib/financial.py�
<listcomp>/ s z!_convert_when.<locals>.<listcomp>)�
isinstance�npZndarrayr �KeyError� TypeError)�whenr r r �
_convert_when' |