Your IP : 3.22.41.80


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

�

��bg����dZddlZddlmZddgZde��vred���d	ZGd
�d��Z	e	��Z
ed��Gd
�dej����ZdS)aI
Module defining global singleton classes.

This module raises a RuntimeError if an attempt to reload it is made. In that
way the identities of the classes defined here are fixed and will remain so
even if numpy itself is reloaded. In particular, a function like the following
will still work correctly after numpy is reloaded::

    def foo(arg=np._NoValue):
        if arg is np._NoValue:
            ...

That was not the case when the singleton classes were defined in the numpy
``__init__.py`` file. See gh-7844 for a discussion of the reload problem that
motivated this module.

�N�)�
set_module�_NoValue�	_CopyMode�
_is_loadedz'Reloading numpy._globals is not allowedTc�,��eZdZdZdZ�fd�Zd�Z�xZS)�_NoValueTypeaWSpecial keyword value.

    The instance of this class may be used as the default value assigned to a
    keyword if no other obvious default (e.g., `None`) is suitable,

    Common reasons for using this keyword are:

    - A new keyword is added to a function, and that function forwards its
      inputs to another function or method which can be defined outside of
      NumPy. For example, ``np.std(x)`` calls ``x.std``, so when a ``keepdims``
      keyword was added that could only be forwarded if the user explicitly
      specified ``keepdims``; downstream array libraries may not have added
      the same keyword, so adding ``x.std(..., keepdims=keepdims)``
      unconditionally could have broken previously working code.
    - A keyword is being deprecated, and a deprecation warning must only be
      emitted when the keyword is used.

    Nc�l��|js&t���|��|_|jS)N)�_NoValueType__instance�super�__new__)�cls�	__class__s ��E/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/_globals.pyr
z_NoValueType.__new__4s,����~�	2�"�W�W�_�_�S�1�1�C�N��~��c��dS)Nz
<no value>���selfs r�__repr__z_NoValueType.__repr__:s���|r)�__name__�
__module__�__qualname__�__doc__rr
r�
__classcell__)rs@rr	r	 sX���������$�J������������rr	�numpyc�$�eZdZdZdZdZdZd�ZdS)ra�
    An enumeration for the copy modes supported
    by numpy.copy() and numpy.array(). The following three modes are supported,

    - ALWAYS: This means that a deep copy of the input
              array will always be taken.
    - IF_NEEDED: This means that a deep copy of the input
                 array will be taken only if necessary.
    - NEVER: This means that the deep copy will never be taken.
             If a copy cannot be avoided then a `ValueError` will be
             raised.

    Note that the buffer-protocol could in theory do copies.  NumPy currently
    assumes an object exporting the buffer protocol will never do this.
    TF�c�n�|tjkrdS|tjkrdSt|�d����)NTFz is neither True nor False.)r�ALWAYS�	IF_NEEDED�
ValueErrorrs r�__bool__z_CopyMode.__bool__Ws?���9�#�#�#��4��9�&�&�&��5��D�=�=�=�>�>�>rN)rrrrr r!�NEVERr#rrrrrAs>�������� �F��I�
�E�?�?�?�?�?r)
r�enum�_utilsr�_set_module�__all__�globals�RuntimeErrorrr	r�Enumrrrr�<module>r,s�����"����-�-�-�-�-�-��{�
#��
�7�7�9�9���
�,�@�
A�
A�A�
�
���������<�<�>�>��
��W���?�?�?�?�?��	�?�?���?�?�?r

?>