§
    ÈÁ³gÛ  ã                   óö   — d Z g d¢ZddlZddlZddlmZ ddlZ	 ddlZn# e	$ r ddlZY nw xY we
Ze
fZeZeZeZd„ Zd„ Zd„ Zd„ Zdd
„Zd„ ZdZd„ Zd„ Zd„ Zd„ Z G d„ d¦  «        Zdd„Zej        Zej         Z!dS )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)r   c                 ót   — t          | t          ¦  «        r|                      d¦  «        S t          | ¦  «        S ©NÚlatin1©Ú
isinstancer   ÚdecodeÚstr©Úss    úO/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/numpy/compat/py3k.pyr   r   "   ó1   € Ý�!•UÑÔð "Ø�xŠx˜Ñ!Ô!Ð!Ýˆq‰6Œ6€Mó    c                 ót   — t          | t          ¦  «        r| S t          | ¦  «                             d¦  «        S r   )r   r   r   Úencoder    s    r"   r   r   '   s1   € Ý�!•UÑÔð ØˆÝˆq‰6Œ6�=Š=˜Ñ"Ô"Ð"r$   c                 ót   — t          | t          ¦  «        r|                      d¦  «        S t          | ¦  «        S r   r   r    s    r"   r   r   ,   r#   r$   c                 ó¸   — t          | t          j        t          j        t          j        f¦  «        sdS 	 |                      ¦   «          dS # t          $ r Y dS w xY w)NFT)r   ÚioÚFileIOÚBufferedReaderÚBufferedWriterÚfilenoÚOSError)Úfs    r"   r   r   1   sc   € Ý�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)Úfilenamer2   s     r"   r   r   <   s   € Ý�˜t¨lÐ;Ñ;Ô;Ð;r$   c                 ó   — | S ©N© r    s    r"   r   r   ?   s   € Ø€Hr$   ÚUc                  ó4   — t          j        ¦   «         d         S )Né   )ÚsysÚexc_infor8   r$   r"   r   r   D   s   € ÝŒ<‰>Œ>˜!ÔÐr$   c                 ó�   — t          | d¦  «        r(t          | t          t          f¦  «        sd„ | D ¦   «         S t	          | ¦  «        S )NÚ__iter__c                 ó,   — g | ]}t          |¦  «        ‘ŒS r8   )r	   ©Ú.0Úys     r"   ú
<listcomp>z"asbytes_nested.<locals>.<listcomp>I   s    € Ð-Ð-Ð- a•˜qÑ!Ô!Ð-Ð-Ð-r$   )Úhasattrr   r   r   r   ©Úxs    r"   r	   r	   G   sJ   € Ýˆq�*ÑÔð ¥j°µU½GÐ4DÑ&EÔ&Eð Ø-Ð-¨1Ð-Ñ-Ô-Ð-å�q‰zŒzÐr$   c                 ó�   — t          | d¦  «        r(t          | t          t          f¦  «        sd„ | D ¦   «         S t	          | ¦  «        S )Nr?   c                 ó,   — g | ]}t          |¦  «        ‘ŒS r8   )r
   rA   s     r"   rD   z$asunicode_nested.<locals>.<listcomp>O   s!   € Ð/Ð/Ð/¨Õ  Ñ#Ô#Ð/Ð/Ð/r$   )rE   r   r   r   r   rF   s    r"   r
   r
   M   sJ   € Ýˆ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.
    )r   r   )Úobjs    r"   r   r   S   s   € õ �c�4Ñ Ô Ð r$   c                   ó&   — e Zd ZdZdd„Zd„ Zd„ ZdS )r   a­  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                 ó   — || _         d S r7   ©Úenter_result)ÚselfrO   s     r"   Ú__init__zcontextlib_nullcontext.__init__j   s   € Ø(ˆÔÐÐr$   c                 ó   — | j         S r7   rN   )rP   s    r"   Ú	__enter__z contextlib_nullcontext.__enter__m   s   € ØÔ Ð r$   c                 ó   — d S r7   r8   )rP   Úexcinfos     r"   Ú__exit__zcontextlib_nullcontext.__exit__p   s   € Øˆr$   r7   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rQ   rS   rV   r8   r$   r"   r   r   \   sP   € € € € € ðð ð)ð )ð )ð )ð!ð !ð !ðð ð ð ð r$   r   c                 óJ   — ddl m}  || |¦  «                             ¦   «         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

    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"   r   r   t   s5   € ð, 5Ð4Ð4Ð4Ð4Ð4ØÐ˜D "Ñ%Ô%×1Ò1Ñ3Ô3Ð3r$   )r0   r7   )"rZ   Ú__all__r<   ÚosÚpathlibr   r)   Úpickle5r   ÚImportErrorÚintr   r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   Úfspathr   ÚPathLiker   r8   r$   r"   ú<module>rj      s�  ððð ðKð Kð K€ð €
€
€
Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø 	€	€	€	ðØÐÐÐÐøØð ð ð Ø€M€M€M€M€Mðøøøð €Ø�€Ø€
Ø
€Ø€ðð ð ð
#ð #ð #ð
ð ð ð
	ð 	ð 	ð<ð <ð <ð <ðð ð ð €ðð ð ðð ð ðð ð ð!ð !ð !ðð ð ð ð ñ ô ð ð04ð 4ð 4ð 4ð4 ŒI€	ØŒk€€€s   š Ÿ	+ª+