Your IP : 3.15.12.133


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/lib/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/lib/__pycache__/_version.cpython-311.pyc

�

��bg���2�dZddlZdgZGd�d��ZdS)aUtility to compare (NumPy) version strings.

The NumpyVersion class allows properly comparing numpy version strings.
The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.

�N�NumpyVersionc�T�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
S)raParse and compare numpy version strings.

    NumPy has the following versioning scheme (numbers given are examples; they
    can be > 9 in principle):

    - Released version: '1.8.0', '1.8.1', etc.
    - Alpha: '1.8.0a1', '1.8.0a2', etc.
    - Beta: '1.8.0b1', '1.8.0b2', etc.
    - Release candidates: '1.8.0rc1', '1.8.0rc2', etc.
    - Development versions: '1.8.0.dev-f1234afa' (git commit hash appended)
    - Development versions after a1: '1.8.0a1.dev-f1234afa',
                                     '1.8.0b2.dev-f1234afa',
                                     '1.8.1rc1.dev-f1234afa', etc.
    - Development versions (no git hash available): '1.8.0.dev-Unknown'

    Comparing needs to be done against a valid version string or other
    `NumpyVersion` instance. Note that all development versions of the same
    (pre-)release compare equal.

    .. versionadded:: 1.9.0

    Parameters
    ----------
    vstring : str
        NumPy version string (``np.__version__``).

    Examples
    --------
    >>> from numpy.lib import NumpyVersion
    >>> if NumpyVersion(np.__version__) < '1.7.0':
    ...     print('skip')
    >>> # skip

    >>> NumpyVersion('1.7')  # raises ValueError, add ".0"
    Traceback (most recent call last):
        ...
    ValueError: Not a valid numpy version string

    c�2�||_tjd|��}|std���|���|_d�|j�d��D��\|_|_|_	t|��|���krd|_n�tjd||���d���}tjd||���d���}tjd||���d���}d	�|||fD��}|r |d
���|_nd|_ttjd|����|_dS)
Nz
\d+\.\d+\.\d+z Not a valid numpy version stringc�,�g|]}t|����S�)�int)�.0�xs  �I/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/lib/_version.py�
<listcomp>z)NumpyVersion.__init__.<locals>.<listcomp>>s*��/%�/%�/%�!�s�1�v�v�/%�/%�/%��.�finalza\dzb\dzrc\dc��g|]}|�|��S)Nr)r	�ms  rrz)NumpyVersion.__init__.<locals>.<listcomp>Fs��E�E�E�Q�q�}�q�}�}�}r
r�z.dev)�vstring�re�match�
ValueError�group�version�split�major�minor�bugfix�len�end�pre_release�bool�search�
is_devversion)�selfr�ver_main�alpha�beta�rc�pre_rels       r�__init__zNumpyVersion.__init__7sp������8�,�g�6�6���	A��?�@�@�@��~�~�'�'���/%�/%��L���s�#�#�/%�/%�/%�+��
�D�J����w�<�<�8�<�<�>�>�)�)�&�D����H�V�W�X�\�\�^�^�_�_�%=�>�>�E��8�F�G�H�L�L�N�N�O�O�$<�=�=�D���'�7�8�<�<�>�>�?�?�#;�<�<�B�E�E�5�$��"3�E�E�E�G��
&�#*�1�:�#3�#3�#5�#5�� � �#%�� �!�"�)�G�W�"=�"=�>�>����r
c���|j|jkrO|j|jkr)|j|jkrd}nA|j|jkrd}n.d}n+|j|jkrd}nd}n|j|jkrd}nd}|S)zCompare major.minor.bugfixr����)rrr�r#�other�vercmps   r�_compare_versionzNumpyVersion._compare_versionNs����:���$�$��z�U�[�(�(��;�%�,�.�.��F�F��[�5�<�/�/��F�F��F�F���e�k�)�)�������
�Z�%�+�
%�
%��F�F��F��
r
c��|j|jkrd}n1|jdkrd}n#|jdkrd}n|j|jkrd}nd}|S)zCompare alpha/beta/rc/final.rrr+r,)rr-s   r�_compare_pre_releasez!NumpyVersion._compare_pre_releasecsf����u�0�0�0��F�F�
�
��
(�
(��F�F�
�
�'�
)�
)��F�F�
�
�� 1�
1�
1��F�F��F��
r
c�J�t|ttf��std���t|t��rt|��}|�|��}|dkr8|�|��}|dkr|j|jurd}n|jrd}nd}|S)Nz,Invalid object to compare with NumpyVersion.rr,r+)�
isinstance�strrrr0r2r"r-s   r�_comparezNumpyVersion._comparers����%�#�|�!4�5�5�	M��K�L�L�L��e�S�!�!�	(� ��'�'�E��&�&�u�-�-���Q�;�;��.�.�u�5�5�F���{�{��%��)<�<�<��F�F��'���F�F��F��
r
c�4�|�|��dkS�Nr�r6�r#r.s  r�__lt__zNumpyVersion.__lt__�����}�}�U�#�#�a�'�'r
c�4�|�|��dkSr8r9r:s  r�__le__zNumpyVersion.__le__�����}�}�U�#�#�q�(�(r
c�4�|�|��dkSr8r9r:s  r�__eq__zNumpyVersion.__eq__�r?r
c�4�|�|��dkSr8r9r:s  r�__ne__zNumpyVersion.__ne__�r?r
c�4�|�|��dkSr8r9r:s  r�__gt__zNumpyVersion.__gt__�r<r
c�4�|�|��dkSr8r9r:s  r�__ge__zNumpyVersion.__ge__�r?r
c��d|jzS)NzNumpyVersion(%s))r)r#s r�__repr__zNumpyVersion.__repr__�s��!�D�L�0�0r
N)�__name__�
__module__�__qualname__�__doc__r)r0r2r6r;r>rArCrErGrIrr
rrrs�������&�&�P?�?�?�.���*
�
�
����,(�(�(�)�)�)�)�)�)�)�)�)�(�(�(�)�)�)�1�1�1�1�1r
)rMr�__all__rrr
r�<module>rOs`����
�	�	�	��
��M1�M1�M1�M1�M1�M1�M1�M1�M1�M1r

?>