Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
numpy
/
lib
/
__pycache__
/
File Content:
ufunclike.cpython-35.opt-1.pyc
W��f� � @ st d Z d d l m Z m Z m Z d d d g Z d d l j j Z d d d � Z d d d � Z d d d � Z d S) 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 C sk t j | � } t j | � } t j | � } | d k rH t j | � } t j | d k | | � | 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.]) Nr .)�nxZ asanyarray�floor�ceilZwhere)�x�yZy1Zy2� r � /ufunclike.pyr s "c C s` | d k r6 t j | � } t j | j d t j �} t j t j | � t j | � | � | S)a� Test element-wise for positive infinity, return result as bool array. Parameters ---------- x : array_like The input array. y : array_like, optional A boolean array with the same shape as `x` to store the result. Returns ------- y : ndarray A boolean array with the same dimensions as the input. If second argument is not supplied then a boolean array is returned with values True where the corresponding element of the input is positive infinity and values False where the element of the input is not positive infinity. If a second argument is supplied the result is stored there. If the type of that array is a numeric type the result is represented as zeros and ones, if the type is boolean then as False and True. The return value `y` is then a reference to that array. See Also -------- isinf, isneginf, isfinite, isnan Notes ----- Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result if the second argument is also supplied when `x` is a scalar input, or if first and second arguments have different shapes. Examples -------- >>> np.isposinf(np.PINF) array(True, dtype=bool) >>> np.isposinf(np.inf) array(True, dtype=bool) >>> np.isposinf(np.NINF) array(False, dtype=bool) >>> np.isposinf([-np.inf, 0., np.inf]) array([False, False, True], dtype=bool) >>> x = np.array([-np.inf, 0., np.inf]) >>> y = np.array([2, 2, 2]) >>> np.isposinf(x, y) array([0, 0, 1]) >>> y array([0, 0, 1]) N�dtype)r �asarray�empty�shape�bool_�logical_and�isinf�signbit)r r r r r r 6 s 8&c C s_ | d k r6 t j | � } t j | j d t j �} t j t j | � t j | � | � | S)a� Test element-wise for negative infinity, return result as bool array. Parameters ---------- x : array_like The input array. y : array_like, optional A boolean array with the same shape and type as `x` to store the result. Returns ------- y : ndarray A boolean array with the same dimensions as the input. If second argument is not supplied then a numpy boolean array is returned with values True where the corresponding element of the input is negative infinity and values False where the element of the input is not negative infinity. If a second argument is supplied the result is stored there. If the type of that array is a numeric type the result is represented as zeros and ones, if the type is boolean then as False and True. The return value `y` is then a reference to that array. See Also -------- isinf, isposinf, isnan, isfinite Notes ----- Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result if the second argument is also supplied when x is a scalar input, or if first and second arguments have different shapes. Examples -------- >>> np.isneginf(np.NINF) array(True, dtype=bool) >>> np.isneginf(np.inf) array(False, dtype=bool) >>> np.isneginf(np.PINF) array(False, dtype=bool) >>> np.isneginf([-np.inf, 0., np.inf]) array([ True, False, False], dtype=bool) >>> x = np.array([-np.inf, 0., np.inf]) >>> y = np.array([2, 2, 2]) >>> np.isneginf(x, y) array([1, 0, 0]) >>> y array([1, 0, 0]) Nr )r r r r r r r r )r r r r r r t s 9%) �__doc__Z __future__r r r �__all__Znumpy.core.numericZcoreZnumericr r r r r r r r �<module> s *>
Submit
FILE
FOLDER
Name
Size
Permission
Action
__init__.cpython-35.opt-1.pyc
1131 bytes
0644
__init__.cpython-35.pyc
1131 bytes
0644
_datasource.cpython-35.opt-1.pyc
19733 bytes
0644
_datasource.cpython-35.pyc
19733 bytes
0644
_iotools.cpython-35.opt-1.pyc
28014 bytes
0644
_iotools.cpython-35.pyc
28014 bytes
0644
_version.cpython-35.opt-1.pyc
5182 bytes
0644
_version.cpython-35.pyc
5182 bytes
0644
arraypad.cpython-35.opt-1.pyc
44366 bytes
0644
arraypad.cpython-35.pyc
44366 bytes
0644
arraysetops.cpython-35.opt-1.pyc
12927 bytes
0644
arraysetops.cpython-35.pyc
12927 bytes
0644
arrayterator.cpython-35.opt-1.pyc
7528 bytes
0644
arrayterator.cpython-35.pyc
7528 bytes
0644
financial.cpython-35.opt-1.pyc
23604 bytes
0644
financial.cpython-35.pyc
23604 bytes
0644
format.cpython-35.opt-1.pyc
23998 bytes
0644
format.cpython-35.pyc
23998 bytes
0644
function_base.cpython-35.opt-1.pyc
131773 bytes
0644
function_base.cpython-35.pyc
131773 bytes
0644
index_tricks.cpython-35.opt-1.pyc
25147 bytes
0644
index_tricks.cpython-35.pyc
25147 bytes
0644
info.cpython-35.opt-1.pyc
6658 bytes
0644
info.cpython-35.pyc
6658 bytes
0644
nanfunctions.cpython-35.opt-1.pyc
43318 bytes
0644
nanfunctions.cpython-35.pyc
43318 bytes
0644
npyio.cpython-35.opt-1.pyc
58048 bytes
0644
npyio.cpython-35.pyc
58048 bytes
0644
polynomial.cpython-35.opt-1.pyc
37107 bytes
0644
polynomial.cpython-35.pyc
37107 bytes
0644
recfunctions.cpython-35.opt-1.pyc
30167 bytes
0644
recfunctions.cpython-35.pyc
30167 bytes
0644
scimath.cpython-35.opt-1.pyc
15056 bytes
0644
scimath.cpython-35.pyc
15056 bytes
0644
setup.cpython-35.opt-1.pyc
551 bytes
0644
setup.cpython-35.pyc
551 bytes
0644
shape_base.cpython-35.opt-1.pyc
25290 bytes
0644
shape_base.cpython-35.pyc
25290 bytes
0644
stride_tricks.cpython-35.opt-1.pyc
6324 bytes
0644
stride_tricks.cpython-35.pyc
6324 bytes
0644
twodim_base.cpython-35.opt-1.pyc
28183 bytes
0644
twodim_base.cpython-35.pyc
28183 bytes
0644
type_check.cpython-35.opt-1.pyc
15932 bytes
0644
type_check.cpython-35.pyc
15932 bytes
0644
ufunclike.cpython-35.opt-1.pyc
5237 bytes
0644
ufunclike.cpython-35.pyc
5237 bytes
0644
user_array.cpython-35.opt-1.pyc
12625 bytes
0644
user_array.cpython-35.pyc
12625 bytes
0644
utils.cpython-35.opt-1.pyc
28570 bytes
0644
utils.cpython-35.pyc
28570 bytes
0644
N4ST4R_ID | Naxtarrr