§
    Ëãßc§!  ã                   óÄ  — d Z ddlmZ d„ Zd„ Z G d„ de¦  «        Ze G d„ de¦  «        ¦   «         Ze G d	„ d
e¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Z	e G d„ de	¦  «        ¦   «         Z
e G d„ de	¦  «        ¦   «         Z ed¦  «         G d„ de¦  «        ¦   «         Z ed¦  «         G d„ dee¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         ZdS )zÚ
Various richly-typed exceptions, that also help us deal with string formatting
in python where it's easier.

By putting the formatting in `__str__`, we also avoid paying the cost for
users who silence the exceptions.
é    )Ú
set_modulec                 ó<   — t          | ¦  «        dk    r| d         S | S )Né   r   )Úlen)Útups    ú8/usr/lib/python3/dist-packages/numpy/core/_exceptions.pyÚ_unpack_tupler	   
   s   € Ý
ˆ3�x„x�1‚}€}Ø�1Œvˆàˆ
ó    c                 óV   — t          | t          ¦  «        sJ ‚| j        j        | _        | S )aG  
    A decorator that makes an exception class look like its base.

    We use this to hide subclasses that are implementation details - the user
    should catch the base type, which is what the traceback will show them.

    Classes decorated with this decorator are subject to removal without a
    deprecation warning.
    )Ú
issubclassÚ	ExceptionÚ__base__Ú__name__)Úclss    r   Ú_display_as_baser      s+   € õ �c�9Ñ%Ô%Ð%Ð%Ð%Ø”<Ô(€C„LØ€Jr
   c                   ó   — e Zd ZdZd„ ZdS )ÚUFuncTypeErrorz% Base class for all ufunc exceptions c                 ó   — || _         d S ©N)Úufunc)Úselfr   s     r   Ú__init__zUFuncTypeError.__init__"   s   € ØˆŒ
ˆ
ˆ
r
   N)r   Ú
__module__Ú__qualname__Ú__doc__r   © r
   r   r   r       s)   € € € € € Ø/Ð/ðð ð ð ð r
   r   c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )Ú_UFuncBinaryResolutionErrorz' Thrown when a binary resolution fails c                 ó¦   •— t          ¦   «                              |¦  «         t          |¦  «        | _        t	          | j        ¦  «        dk    sJ ‚d S )Né   )Úsuperr   ÚtupleÚdtypesr   ©r   r   r#   Ú	__class__s      €r   r   z$_UFuncBinaryResolutionError.__init__)   sI   ø€ Ý‰Œ×Ò˜ÑÔÐÝ˜F‘m”mˆŒÝ�4”;ÑÔ 1Ò$Ð$Ð$Ð$Ð$Ð$r
   c                 ó<   —  dj         | j        j        g| j        ¢R Ž S )Nz7ufunc {!r} cannot use operands with types {!r} and {!r})Úformatr   r   r#   ©r   s    r   Ú__str__z#_UFuncBinaryResolutionError.__str__.   s5   € ðØEÜ
ØŒJÔð
ð #'¤+ð
ð 
ð 
ð 	
r
   ©r   r   r   r   r   r)   Ú__classcell__©r%   s   @r   r   r   &   sM   ø€ € € € € à1Ð1ð%ð %ð %ð %ð %ð

ð 
ð 
ð 
ð 
ð 
ð 
r
   r   c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )Ú_UFuncNoLoopErrorz* Thrown when a ufunc loop cannot be found c                 ór   •— t          ¦   «                              |¦  «         t          |¦  «        | _        d S r   )r!   r   r"   r#   r$   s      €r   r   z_UFuncNoLoopError.__init__9   s,   ø€ Ý‰Œ×Ò˜ÑÔÐÝ˜F‘m”mˆŒˆˆr
   c           	      óÔ   — d                      | j        j        t          | j        d | j        j        …         ¦  «        t          | j        | j        j        d …         ¦  «        ¦  «        S )NzLufunc {!r} did not contain a loop with signature matching types {!r} -> {!r})r'   r   r   r	   r#   Úninr(   s    r   r)   z_UFuncNoLoopError.__str__=   sW   € ðç
Š&ØŒJÔÝ˜$œ+ o t¤z¤~ oÔ6Ñ7Ô7Ý˜$œ+ d¤j¤n o oÔ6Ñ7Ô7ñ
ô 
ð	
r
   r*   r,   s   @r   r.   r.   6   sM   ø€ € € € € à4Ð4ð$ð $ð $ð $ð $ð
ð 
ð 
ð 
ð 
ð 
ð 
r
   r.   c                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )Ú_UFuncCastingErrorc                 ót   •— t          ¦   «                              |¦  «         || _        || _        || _        d S r   )r!   r   ÚcastingÚfrom_Úto)r   r   r5   r6   r7   r%   s        €r   r   z_UFuncCastingError.__init__J   s4   ø€ Ý‰Œ×Ò˜ÑÔÐØˆŒØˆŒ
ØˆŒˆˆr
   )r   r   r   r   r+   r,   s   @r   r3   r3   H   s8   ø€ € € € € ðð ð ð ð ð ð ð ð r
   r3   c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )Ú_UFuncInputCastingErrorz, Thrown when a ufunc input cannot be casted c                 ó^   •— t          ¦   «                              ||||¦  «         || _        d S r   )r!   r   Úin_i©r   r   r5   r6   r7   Úir%   s         €r   r   z _UFuncInputCastingError.__init__T   s,   ø€ Ý‰Œ×Ò˜ ¨°Ñ3Ô3Ð3ØˆŒ	ˆ	ˆ	r
   c                 ó¾   — | j         j        dk    rd                     | j        ¦  «        nd}d                     | j         j        || j        | j        | j        ¦  «        S )Nr   ú{} Ú zGCannot cast ufunc {!r} input {}from {!r} to {!r} with casting rule {!r})r   r1   r'   r;   r   r6   r7   r5   ©r   Úi_strs     r   r)   z_UFuncInputCastingError.__str__X   sW   € à+/¬:¬>¸QÒ+>Ð+>�—’˜TœYÑ'Ô'Ð'ÀBˆðç
Š&ØŒJÔ ¨¬
°D´G¸T¼\ñ
ô 
ð	
r
   r*   r,   s   @r   r9   r9   Q   sM   ø€ € € € € à6Ð6ðð ð ð ð ð
ð 
ð 
ð 
ð 
ð 
ð 
r
   r9   c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )Ú_UFuncOutputCastingErrorz- Thrown when a ufunc output cannot be casted c                 ó^   •— t          ¦   «                              ||||¦  «         || _        d S r   )r!   r   Úout_ir<   s         €r   r   z!_UFuncOutputCastingError.__init__f   s,   ø€ Ý‰Œ×Ò˜ ¨°Ñ3Ô3Ð3ØˆŒ
ˆ
ˆ
r
   c                 ó¾   — | j         j        dk    rd                     | j        ¦  «        nd}d                     | j         j        || j        | j        | j        ¦  «        S )Nr   r?   r@   zHCannot cast ufunc {!r} output {}from {!r} to {!r} with casting rule {!r})r   Únoutr'   rF   r   r6   r7   r5   rA   s     r   r)   z _UFuncOutputCastingError.__str__j   sW   € à,0¬J¬O¸qÒ,@Ð,@�—’˜TœZÑ(Ô(Ð(Àbˆðç
Š&ØŒJÔ ¨¬
°D´G¸T¼\ñ
ô 
ð	
r
   r*   r,   s   @r   rD   rD   c   sM   ø€ € € € € à7Ð7ðð ð ð ð ð
ð 
ð 
ð 
ð 
ð 
ð 
r
   rD   Únumpyc                   ó   — e Zd ZdZdS )ÚTooHardErrorzÿmax_work was exceeded.

    This is raised whenever the maximum number of candidate solutions 
    to consider specified by the ``max_work`` parameter is exceeded.
    Assigning a finite number to max_work may have caused the operation 
    to fail.

    N)r   r   r   r   r   r
   r   rK   rK   v   s   € € € € € ðð ð 	€Dr
   rK   c                   ó$   — e Zd ZdZdZdd„Zd„ ZdS )Ú	AxisErroraÞ  Axis supplied was invalid.

    This is raised whenever an ``axis`` parameter is specified that is larger
    than the number of array dimensions.
    For compatibility with code written against older numpy versions, which
    raised a mixture of `ValueError` and `IndexError` for this situation, this
    exception subclasses both to ensure that ``except ValueError`` and
    ``except IndexError`` statements continue to catch `AxisError`.

    .. versionadded:: 1.13

    Parameters
    ----------
    axis : int or str
        The out of bounds axis or a custom exception message.
        If an axis is provided, then `ndim` should be specified as well.
    ndim : int, optional
        The number of array dimensions.
    msg_prefix : str, optional
        A prefix for the exception message.

    Attributes
    ----------
    axis : int, optional
        The out of bounds axis or ``None`` if a custom exception
        message was provided. This should be the axis as passed by
        the user, before any normalization to resolve negative indices.

        .. versionadded:: 1.22
    ndim : int, optional
        The number of array dimensions or ``None`` if a custom exception
        message was provided.

        .. versionadded:: 1.22


    Examples
    --------
    >>> array_1d = np.arange(10)
    >>> np.cumsum(array_1d, axis=1)
    Traceback (most recent call last):
      ...
    numpy.AxisError: axis 1 is out of bounds for array of dimension 1

    Negative axes are preserved:

    >>> np.cumsum(array_1d, axis=-2)
    Traceback (most recent call last):
      ...
    numpy.AxisError: axis -2 is out of bounds for array of dimension 1

    The class constructor generally takes the axis and arrays'
    dimensionality as arguments:

    >>> print(np.AxisError(2, 1, msg_prefix='error'))
    error: axis 2 is out of bounds for array of dimension 1

    Alternatively, a custom exception message can be passed:

    >>> print(np.AxisError('Custom error message'))
    Custom error message

    ©ÚaxisÚndimÚ_msgNc                 ór   — ||cxu r€n n|| _         d | _        d | _        d S || _         || _        || _        d S r   )rQ   rO   rP   )r   rO   rP   Ú
msg_prefixs       r   r   zAxisError.__init__È   sQ   € Ø�:Ð%Ð%Ð%Ð%Ð%Ð%Ð%Ð%àˆDŒIØˆDŒIØˆDŒIˆIˆIà"ˆDŒIØˆDŒIØˆDŒIˆIˆIr
   c                 óz   — | j         }| j        }||cxu r€
n n| j        S d|› d|› �}| j        �| j        › d|› �}|S )Nzaxis z) is out of bounds for array of dimension z: rN   )r   rO   rP   Úmsgs       r   r)   zAxisError.__str__Ó   sl   € ØŒyˆØŒyˆà�4ÐÐÐÐÐÐÐÐØ”9ÐàO˜$ÐOÐOÈÐOÐOˆCØŒyÐ$ØœÐ+Ð+ cÐ+Ð+�ØˆJr
   )NN)r   r   r   r   Ú	__slots__r   r)   r   r
   r   rM   rM   „   sI   € € € € € ð>ð >ð@ )€Ið	ð 	ð 	ð 	ð
ð 
ð 
ð 
ð 
r
   rM   c                   óJ   — e Zd ZdZd„ Zed„ ¦   «         Zed„ ¦   «         Zd„ Z	dS )Ú_ArrayMemoryErrorz) Thrown when an array cannot be allocatedc                 ó"   — || _         || _        d S r   )ÚshapeÚdtype)r   rZ   r[   s      r   r   z_ArrayMemoryError.__init__ã   s   € ØˆŒ
ØˆŒ
ˆ
ˆ
r
   c                 ó<   — | j         j        }| j        D ]}||z  }Œ|S r   )r[   ÚitemsizerZ   )r   Ú	num_bytesÚdims      r   Ú_total_sizez_ArrayMemoryError._total_sizeç   s/   € à”JÔ'ˆ	Ø”:ð 	ð 	ˆCØ˜ÑˆIˆIØÐr
   c                 óè  — d}d}g d¢}t          |                      ¦   «         dz
  d¦  «        |z  }d||z  z  }| |z  }~t          |¦  «        |k    r
|dz  }||z  }|t          |¦  «        k    r"t          |¦  «        dz
  }|d||z
  |z  z  z  }|}||         }|dk    rd                     ||¦  «        S t          |¦  «        dk     rd                     ||¦  «        S d	                     ||¦  «        S )
z5 Convert a number of bytes into a binary size string é
   i   )ÚbytesÚKiBÚMiBÚGiBÚTiBÚPiBÚEiBr   r   z	{:.0f} {}iè  z
{:#.3g} {}z
{:#.0f} {})ÚmaxÚ
bit_lengthÚroundr   r'   )	r^   Ú	LOG2_STEPÚSTEPÚunitsÚunit_iÚunit_valÚn_unitsÚ
new_unit_iÚ	unit_names	            r   Ú_size_to_stringz!_ArrayMemoryError._size_to_stringî   s&  € ð
 ˆ	ØˆØCÐCÐCˆå�Y×)Ò)Ñ+Ô+¨aÑ/°Ñ3Ô3°yÑ@ˆØ˜ )Ñ+Ñ,ˆØ˜hÑ&ˆØõ �‰>Œ>˜TÒ!Ð!Ø�a‰KˆFØ�t‰OˆGð •S˜‘Z”ZÒÐÝ˜U™œ a™ˆJØ�q˜f zÑ1°YÑ>Ñ?Ñ?ˆGØˆFà˜&”Mˆ	à�QŠ;ˆ;à×%Ò% g¨yÑ9Ô9Ð9Ý�7‰^Œ^˜dÒ"Ð"à×&Ò& w°	Ñ:Ô:Ð:ð  ×&Ò& w°	Ñ:Ô:Ð:r
   c                 óx   — |                       | j        ¦  «        }d                     || j        | j        ¦  «        S )NzAUnable to allocate {} for an array with shape {} and data type {})ru   r`   r'   rZ   r[   )r   Úsize_strs     r   r)   z_ArrayMemoryError.__str__  s5   € Ø×'Ò'¨Ô(8Ñ9Ô9ˆàOßŠV�H˜dœj¨$¬*Ñ5Ô5ð	
r
   N)
r   r   r   r   r   Úpropertyr`   Ústaticmethodru   r)   r   r
   r   rX   rX   à   so   € € € € € à3Ð3ðð ð ð ðð ñ „Xðð ð";ð ";ñ „\ð";ðH
ð 
ð 
ð 
ð 
r
   rX   N)r   Únumpy.core.overridesr   r	   r   Ú	TypeErrorr   r   r.   r3   r9   rD   ÚRuntimeErrorrK   Ú
ValueErrorÚ
IndexErrorrM   ÚMemoryErrorrX   r   r
   r   ú<module>r€      sN  ððð ð ,Ð +Ð +Ð +Ð +Ð +ðð ð ðð ð ðð ð ð ð �Yñ ô ð ð ð
ð 
ð 
ð 
ð 
 .ñ 
ô 
ñ Ôð
ð ð
ð 
ð 
ð 
ð 
˜ñ 
ô 
ñ Ôð
ð" ðð ð ð ð ˜ñ ô ñ Ôðð ð
ð 
ð 
ð 
ð 
Ð0ñ 
ô 
ñ Ôð
ð" ð
ð 
ð 
ð 
ð 
Ð1ñ 
ô 
ñ Ôð
ð$ €ˆGÑÔð
	ð 
	ð 
	ð 
	ð 
	�<ñ 
	ô 
	ñ Ôð
	ð €ˆGÑÔðXð Xð Xð Xð X�
˜Jñ Xô Xñ ÔðXðv ð7
ð 7
ð 7
ð 7
ð 7
˜ñ 7
ô 7
ñ Ôð7
ð 7
ð 7
r
   