Hacked By AnonymousFox

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

�

�܋f����dZgd�ZddlZddlZddlmZddlZ	ddlZn#e	$rddlZYnwxYwe
Ze
fZe
Ze
ZeZd�Zd�Zd�Zd�Zdd
�Zd�ZdZd
�Zd�Zd�Zd�ZGd�d��Zdd�ZejZej Z!dS)a�
Python 3.X compatibility tools.

While this file was originally intended for Python 2 -> 3 transition,
it is now used to create a compatibility layer between different
minor versions of Python 3.

While the active version of numpy may not support a given version of python, we
allow downstream libraries to continue to use these shims for forward
compatibility with numpy while they transition their code to newer versions of
Python.
)�bytes�asbytes�	isfileobj�getexception�strchar�unicode�	asunicode�asbytes_nested�asunicode_nested�asstr�open_latin1�long�
basestring�sixu�
integer_types�is_pathlib_path�npy_load_module�Path�pickle�contextlib_nullcontext�	os_fspath�os_PathLike�N)rc�t�t|t��r|�d��St|��S�N�latin1��
isinstancer�decode�str��ss �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/compat/py3k.pyrr"�1���!�U���"��x�x��!�!�!��q�6�6�M�c�t�t|t��r|St|���d��Sr)rrr�encoder s r"rr's1���!�U�������q�6�6�=�=��"�"�"r$c�t�t|t��r|�d��St|��Srrr s r"rr,r#r$c��t|tjtjtjf��sdS	|���dS#t$rYdSwxYw)NFT)r�io�FileIO�BufferedReader�BufferedWriter�fileno�OSError)�fs r"rr1sc���a�"�)�R�%6��8I�J�K�K���u��	
���
�
�
��t�������u�u����s�A�
A�A�rc�&�t||d���S)Nz
iso-8859-1)�mode�encoding)�open)�filenamer2s  r"rr<s����t�l�;�;�;�;r$c��|S�N�r s r"rr?s���Hr$�Uc�4�tj��dS)N�)�sys�exc_infor8r$r"rrDs���<�>�>�!��r$c��t|d��r(t|ttf��sd�|D��St	|��S)N�__iter__c�,�g|]}t|����Sr8)r	��.0�ys  r"�
<listcomp>z"asbytes_nested.<locals>.<listcomp>Is ��-�-�-�a��q�!�!�-�-�-r$)�hasattrrrrr��xs r"r	r	GsJ���q�*����j��U�G�4D�&E�&E��-�-�1�-�-�-�-��q�z�z�r$c��t|d��r(t|ttf��sd�|D��St	|��S)Nr?c�,�g|]}t|����Sr8)r
rAs  r"rDz$asunicode_nested.<locals>.<listcomp>Os!��/�/�/�� ��#�#�/�/�/r$)rErrrrrFs r"r
r
MsJ���q�*����j��U�G�4D�&E�&E��/�/�Q�/�/�/�/���|�|�r$c�,�t|t��S)z�
    Check whether obj is a `pathlib.Path` object.

    Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.
    )rr)�objs r"rrSs���c�4� � � r$c�&�eZdZdZdd�Zd�Zd�ZdS)ra�Context manager that does no additional processing.

    Used as a stand-in for a normal context manager, when a particular
    block of code is only sometimes used with a normal context manager:

    cm = optional_cm if condition else nullcontext()
    with cm:
        # Perform operation, using optional_cm if condition is True

    .. note::
        Prefer using `contextlib.nullcontext` instead of this context manager.
    Nc��||_dSr7��enter_result)�selfrOs  r"�__init__zcontextlib_nullcontext.__init__js��(����r$c��|jSr7rN)rPs r"�	__enter__z contextlib_nullcontext.__enter__ms��� � r$c��dSr7r8)rP�excinfos  r"�__exit__zcontextlib_nullcontext.__exit__ps���r$r7)�__name__�
__module__�__qualname__�__doc__rQrSrVr8r$r"rr\sP��������)�)�)�)�!�!�!�
�
�
�
�
r$rc�J�ddlm}|||�����S)a�
    Load a module. Uses ``load_module`` which will be deprecated in python
    3.12. An alternative that uses ``exec_module`` is in
    numpy.distutils.misc_util.exec_mod_from_location

    .. versionadded:: 1.11.2

    Parameters
    ----------
    name : str
        Full module name.
    fn : str
        Path to module file.
    info : tuple, optional
        Only here for backward compatibility with Python 2.*.

    Returns
    -------
    mod : module

    r)�SourceFileLoader)�importlib.machineryr\�load_module)�name�fn�infor\s    r"rrts5��05�4�4�4�4�4���D�"�%�%�1�1�3�3�3r$)r0r7)"rZ�__all__r<�os�pathlibrr)�pickle5r�ImportError�intr
rrrrrrrrrrrrrr	r
rrr�fspathr�PathLikerr8r$r"�<module>rjs�����K�K�K���
�
�
�	�	�	�	�������	�	�	�	�������������M�M�M�M�M���������
�
�
�

��
�����
#�#�#�
���
	�	�	�<�<�<�<�
�
�
������������!�!�!�
�
�
�
�
�
�
�
�04�4�4�4�8
�I�	��k���s��	+�+

Hacked By AnonymousFox1.0, Coded By AnonymousFox