HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/numpy/core/__pycache__/getlimits.cpython-37.pyc
B

<�Fd�G�@s�dZddlmZmZmZddgZddlZddlmZddl	m
Z
dd	l	mZdd
l
m
Z
mZddlmZmZddl	mZd
d�Zdd�ZejejejejejejiZdZejeejde�d�d�ejeej de�d�d�ej!eej"de�d�d�ej#eej$de�d�d�iZ%Gdd�de&�Z'ej(Z)e'e)dddd d!d"d#d"dee)d��ee)d��e)d$�e)d%�d&�Z*ej+Z,e'e,d'd(d)d*d+d,d#d"dee,d'��ee,d(��e,d-d#d*�ee,d)��d&�Z-ej.Z/d.Z0d/Z1e'e/d0d1d2d3d4d5d#d"dd6e0d7e0e1e/d8�e1d&�Z2ej!Z3ee3d9��Z4ee3d:��Z5e
j6d;d<��e3d�e4e5e3d8�Z7WdQRXe'e3d=d9d:d>d?d@d#d"dee3d=��e4e7e5d&�Z8ee3dA��Z9ee3d:��Z:e
j6d;d<��e3d�e9e:e3d8�Z;WdQRXe'e3dBdAd:d>dCd@d#d"dee3dB��e9e;e:d&�Z<e=edD��r�e�>e3e�e3d��ne2j?Z@e'e3dEdFd2d3dGd5d#d"dee3dE��ee3dF��e@ee3d2��d&�ZAe2e-e*e<eAeAe8dH�ZBdIdJ�ZCdKdL�ZDGdMd�de&�ZEGdNd�de&�ZFdS)OzJMachine limits for Float32 and Float64 and (long double) if available...

�)�division�absolute_import�print_function�finfo�iinfoN�)�MachAr)�numeric)�numerictypes)�array�inf)�log10�exp2)�umathcCs|jdkr|��}d|_|S)zfix rank-0 --> rank-1r)r)�ndim�copy�shape)�a�r�G/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/getlimits.py�_fr0s
rcCs|jdkr|��}d|_|S)zfix rank > 0 --> rank-0rr)�sizerr)rrrr�_fr1s
rz(numpy {} precision floating point numberz%24.16e�double)�itype�fmt�titlez%15.7e�singlez%szlong doublez%12.5e�halfc@sTeZdZdZdd�Zedd��Zedd��Zedd	��Zed
d��Z	edd
��Z
dS)�
MachArLikez$ Object to simulate MachAr instance cs�t���fdd���fdd�}��fdd�|_�d|_||�d��|_|_||�d��|_||�d��|_|_||�d	��|_	|_
�d
|�d��|_|j�
|�tt|j��|_|�d�|j�|_dS)
Ncst|g��S)N)r)�v)�ftyperr�<lambda>E�z%MachArLike.__init__.<locals>.<lambda>cst�|��S)N)r)r )�
float_convrrr"Fr#cs�dtt|�d��S)Nrr)rr)r )r!�paramsrrr"Gsr�eps�epsneg�huge�tinyr�ibeta�
)�_MACHAR_PARAMS�
_float_to_strr�pop�epsilonr&r'�xmaxr(�xminr)r*�__dict__�update�intr
�	precision�
resolution)�selfr!�kwargsZfloat_to_floatr)r$r!r%r�__init__As
zMachArLike.__init__cCs|�|j�S)N)r-r&)r7rrr�_str_epsXszMachArLike._str_epscCs|�|j�S)N)r-r')r7rrr�_str_epsneg\szMachArLike._str_epsnegcCs|�|j�S)N)r-r1)r7rrr�	_str_xmin`szMachArLike._str_xmincCs|�|j�S)N)r-r0)r7rrr�	_str_xmaxdszMachArLike._str_xmaxcCs|�|j�S)N)r-r6)r7rrr�_str_resolutionhszMachArLike._str_resolutionN)�__name__�
__module__�__qualname__�__doc__r9�propertyr:r;r<r=r>rrrrr>sri����i����i��r+��i�g?)
�machep�negep�minexp�maxexp�it�iexpr*ZirndZngrdr&r'r(r)i��i��i�������g��?g�<gi���i���i���i�4�g�<g�?�i����i����ignore)�alli����i@�p�i����i�����?�	nextafteri����i�����i)s��������s��̽sf�s
���������s������Y<��������s��������������Y<s����������������cCs�t�|�}|dkrtt|���|d��d���}t�|�}|dkr^|tjkr^t�|dd��}|dk	rj|St	j
d�||�tdd�t
|�S)a� Get MachAr instance or MachAr-like instance

    Get parameters for floating point type, by first trying signatures of
    various known floating point types, then, if none match, attempting to
    identify parameters by analysis.

    Parameters
    ----------
    ftype : class
        Numpy floating point type class (e.g. ``np.float64``)

    Returns
    -------
    ma_like : instance of :class:`MachAr` or :class:`MachArLike`
        Object giving floating point parameters for `ftype`.

    Warns
    -----
    UserWarning
        If the binary signature of the float type is not in the dictionary of
        known float types.
    Nz-0.1�<r+zVSignature {} for {} does not match any known type: falling back to type probe functionrF)�
stacklevel)r,�get�
ValueError�reprZnewbyteorder�tobytes�_KNOWN_TYPES�ntypes�
longdouble�warnings�warn�format�UserWarning�_discovered_machar)r!r%�keyZma_likerrr�_get_machar�s


rics>t��t�fdd��fdd��fdd���fdd��d�S)zB Create MachAr instance with found information on float types
    cst|g��S)N)r)r )r!rrr"*r#z$_discovered_machar.<locals>.<lambda>cst|��d��dS)Nrr)rZastype)r )r%rrr"+r#cstt|�d��S)Nr)rr)r )r!rrr",r#cs�dtt|�d��S)Nrr)rr)r )r!r%rrr"-r#r)r,r)r!r)r!r%rrg&s

rgc@s4eZdZdZiZdd�Zdd�Zdd�Zdd	�Zd
S)ran	
    finfo(dtype)

    Machine limits for floating point types.

    Attributes
    ----------
    bits : int
        The number of bits occupied by the type.
    eps : float
        The smallest representable positive number such that
        ``1.0 + eps != 1.0``.  Type of `eps` is an appropriate floating
        point type.
    epsneg : floating point number of the appropriate type
        The smallest representable positive number such that
        ``1.0 - epsneg != 1.0``.
    iexp : int
        The number of bits in the exponent portion of the floating point
        representation.
    machar : MachAr
        The object which calculated these parameters and holds more
        detailed information.
    machep : int
        The exponent that yields `eps`.
    max : floating point number of the appropriate type
        The largest representable number.
    maxexp : int
        The smallest positive power of the base (2) that causes overflow.
    min : floating point number of the appropriate type
        The smallest representable number, typically ``-max``.
    minexp : int
        The most negative power of the base (2) consistent with there
        being no leading 0's in the mantissa.
    negep : int
        The exponent that yields `epsneg`.
    nexp : int
        The number of bits in the exponent including its sign and bias.
    nmant : int
        The number of bits in the mantissa.
    precision : int
        The approximate number of decimal digits to which this kind of
        float is precise.
    resolution : floating point number of the appropriate type
        The approximate decimal resolution of this type, i.e.,
        ``10**-precision``.
    tiny : float
        The smallest positive usable number.  Type of `tiny` is an
        appropriate floating point type.

    Parameters
    ----------
    dtype : float, dtype, or instance
        Kind of floating point data-type about which to get information.

    See Also
    --------
    MachAr : The implementation of the tests that produce this information.
    iinfo : The equivalent for integer data types.

    Notes
    -----
    For developers of NumPy: do not instantiate this at the module level.
    The initial calculation of these parameters is expensive and negatively
    impacts import times.  These objects are cached, so calling ``finfo()``
    repeatedly inside your functions is not a problem.

    cCsyt�|�}Wn"tk
r0t�t|��}YnX|j�|d�}|dk	rL|S|g}t�|�}||k	rr|�|�|}t|tj	�s�t
d|��|j�|d�}|dk	r�|St|tj�s�t|}||k	r�|�|�|}|j�|d�}|dk	r�|St
�|��|�}x|D]}||j|<q�W|S)Nzdata type %r not inexact)r	�dtype�	TypeError�type�_finfo_cacher\Z
obj2sctype�append�
issubclassZinexactr]Zfloating�_convert_to_float�object�__new__�_init)�clsrj�objZdtypesZnewdtypeZdtrrrrrxs:



z
finfo.__new__cCs�t�|�|_t|�}xdD]}t||t||��qWx$dD]}t||t||�jd�q:W|jjd|_|jjd|_	|j	|_
|jjd|_|j|_
|j|_||_|j��|_|j��|_|j��|_|j��|_|j��|_|S)N)r5rLrJrIrHrG)r)r6r'rrO)r	rjri�setattr�getattrZflat�itemsize�bitsr(�max�minr&rLZnexprKZnmant�macharr<�stripZ	_str_tinyr=Z_str_maxr;r:r>)r7rjr|Zwordrrrrs�s&


zfinfo._initcCsd}||jS)Na�Machine parameters for %(dtype)s
---------------------------------------------------------------
precision = %(precision)3s   resolution = %(_str_resolution)s
machep = %(machep)6s   eps =        %(_str_eps)s
negep =  %(negep)6s   epsneg =     %(_str_epsneg)s
minexp = %(minexp)6s   tiny =       %(_str_tiny)s
maxexp = %(maxexp)6s   max =        %(_str_max)s
nexp =   %(nexp)6s   min =        -max
---------------------------------------------------------------
)r2)r7rrrr�__str__�s
z
finfo.__str__cCs"|jj}|j��}||d<d|S)N�klasszZ%(klass)s(resolution=%(resolution)s, min=-%(_str_max)s, max=%(_str_max)s, dtype=%(dtype)s))�	__class__r?r2r)r7�c�drrr�__repr__�s

zfinfo.__repr__N)	r?r@rArBrmrrrsr~r�rrrrr1sC!c@sPeZdZdZiZiZdd�Zdd�Zee�Zdd�Z	ee	�Z	dd	�Z
d
d�ZdS)
ral
    iinfo(type)

    Machine limits for integer types.

    Attributes
    ----------
    bits : int
        The number of bits occupied by the type.
    min : int
        The smallest integer expressible by the type.
    max : int
        The largest integer expressible by the type.

    Parameters
    ----------
    int_type : integer type, dtype, or instance
        The kind of integer data type to get information about.

    See Also
    --------
    finfo : The equivalent for floating point data types.

    Examples
    --------
    With types:

    >>> ii16 = np.iinfo(np.int16)
    >>> ii16.min
    -32768
    >>> ii16.max
    32767
    >>> ii32 = np.iinfo(np.int32)
    >>> ii32.min
    -2147483648
    >>> ii32.max
    2147483647

    With instances:

    >>> ii32 = np.iinfo(np.int32(10))
    >>> ii32.min
    -2147483648
    >>> ii32.max
    2147483647

    cCsvyt�|�|_Wn$tk
r4t�t|��|_YnX|jj|_|jjd|_d|j|jf|_|jdkrrtd��dS)NrOz%s%dZiuzInvalid integer data type.)	r	rjrkrl�kindrxryrhr])r7Zint_typerrrr9�s

ziinfo.__init__cCs\|jdkrdSytj|j}Wn4tk
rRtd|jd>�}|tj|j<YnX|SdS)zMinimum value of given dtype.�urrN)r�r�	_min_valsrh�KeyErrorr4ry)r7�valrrrr{s
z	iinfo.mincCsjytj|j}WnTtk
rd|jdkr>td|j>d�}ntd|jd>d�}|tj|j<YnX|S)zMaximum value of given dtype.r�r)r�	_max_valsrhr�r�r4ry)r7r�rrrrzs
z	iinfo.maxcCsd}||j|j|jd�S)zString representation.z�Machine parameters for %(dtype)s
---------------------------------------------------------------
min = %(min)s
max = %(max)s
---------------------------------------------------------------
)rjr{rz)rjr{rz)r7rrrrr~"sz
iinfo.__str__cCsd|jj|j|j|jfS)Nz%s(min=%s, max=%s, dtype=%s))r�r?r{rzrj)r7rrrr�-sziinfo.__repr__N)r?r@rArBr�r�r9r{rCrzr~r�rrrrr�s/)GrBZ
__future__rrr�__all__rcr|r�r	r
rarrrr
rrrZcsinglerZcomplex_Zfloat_Z
clongfloatZ	longfloatrpZ
_title_fmtr�dictZint64reZint32rbZlonglongrZint16r,rqrZfloat16Z_f16Z_float16_maZfloat32Z_f32Z_float32_maZfloat64Z_f64Z_epsneg_f64Z	_tiny_f64Z_float64_maZ_ldZ_epsneg_f128Z
_tiny_f128ZerrstateZ
_huge_f128Z_float128_maZ_epsneg_f80Z	_tiny_f80Z	_huge_f80Z_float80_ma�hasattrrXr(Z_huge_ddZ_float_dd_mar`rirgrrrrrr�<module>s 	1



"
"
 

+