File: //opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/__pycache__/ufunclike.cpython-37.pyc
B
<�Fdj � @ sz d Z ddlmZmZmZ dddgZddlm mZ ddl
Z
ddlZdd� Zedd d��Z
ed
d
d��Zeddd��ZdS )zr
Module of functions that are like ufuncs in acting on arrays and optionally
storing results in an output array.
� )�division�absolute_import�print_function�fix�isneginf�isposinfNc s t �� �d� fdd� �}|S )z|
Allow the out argument to be passed as the name `y` (deprecated)
In future, this decorator should be removed.
Nc sV d|krBd|kr t d�� j���|�d�}tjd�� j�tdd� � | fd|i|��S )N�y�outz-{} got multiple values for argument 'out'/'y'zXThe name of the out argument to {} has changed from `y` to `out`, to match other ufuncs.� )�
stacklevel)� TypeError�format�__name__�pop�warnings�warn�DeprecationWarning)�xr �kwargs)�f� �F/opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/ufunclike.py�func s
z$_deprecate_out_named_y.<locals>.func)N)� functools�wraps)r r r )r r �_deprecate_out_named_y s r c C sN t �t j| |d��}t j| |t �| d�d�}|dkrJt|�t jkrJ|d }|S )a�
Round to nearest integer towards zero.
Round an array of floats element-wise to nearest integer towards zero.
The rounded values are returned as floats.
Parameters
----------
x : array_like
An array of floats to be rounded
y : ndarray, optional
Output array
Returns
-------
out : ndarray of floats
The array of rounded numbers
See Also
--------
trunc, floor, ceil
around : Round to given number of decimals
Examples
--------
>>> np.fix(3.14)
3.0
>>> np.fix(3)
3.0
>>> np.fix([2.1, 2.9, -2.1, -2.9])
array([ 2., 2., -2., -2.])
)r r )r �whereNr )�nxZ
asanyarrayZceilZfloorZ
greater_equal�typeZndarray)r r Zresr r r r '