Ë
    &�£jÉ  ã                   óê   — d 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 G d„ de
«      «       Zy)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.
c                 ó,   — t        | «      dk(  r| d   S | S )Né   é    )Úlen)Útups    ú9C:\FundamentalWorkbench\vendor\numpy\_core\_exceptions.pyÚ_unpack_tupler   	   s   € Ü
ˆ3ƒx�1‚}Ø�1‰vˆàˆ
ó    c                 ó`   — 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y)ÚUFuncTypeErrorz% Base class for all ufunc exceptions c                 ó   — || _         y ©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 )Ú_UFuncNoLoopErrorz* Thrown when a ufunc loop cannot be found c                 óD   •— t         ‰| �  |«       t        |«      | _        y r   )Úsuperr   ÚtupleÚdtypes©r   r   r!   Ú	__class__s      €r   r   z_UFuncNoLoopError.__init__(   s   ø€ Ü‰Ñ˜ÔÜ˜F“mˆ�r	   c           
      óè   — d| j                   j                  ›dt        | j                  d | j                   j                   «      ›dt        | j                  | j                   j                  d  «      ›�S )Nzufunc z6 did not contain a loop with signature matching types z -> )r   r   r   r!   Únin©r   s    r   Ú__str__z_UFuncNoLoopError.__str__,   sf   € à�T—Z‘Z×(Ñ(Ð+ð ,Ü+¨D¯K©K¸¸¿¹¿¹Ð,HÓIÐLð MÜ §¡¨D¯J©J¯N©N¨OÐ <Ó=Ð@ðBð	
r	   ©r   r   r   r   r   r'   Ú__classcell__©r#   s   @r   r   r   %   s   ø„ á4ô$ö
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                 óZ   •— t         ‰| �  ||«       t        | j                  «      dk(  sJ ‚y )Né   )r   r   r   r!   r"   s      €r   r   z$_UFuncBinaryResolutionError.__init__7   s)   ø€ Ü‰Ñ˜ Ô'Ü�4—;‘;Ó 1Ò$Ð$Ñ$r	   c                 ód   —  dj                   | j                  j                  g| j                  ¢­Ž S )Nz7ufunc {!r} cannot use operands with types {!r} and {!r})Úformatr   r   r!   r&   s    r   r'   z#_UFuncBinaryResolutionError.__str__;   s4   € ðØEß
‰&Ø�J‰J×Ñð
ð #'§+¡+ò
ð 	
r	   r(   r*   s   @r   r,   r,   4   s   ø„ á1ô%ö
r	   r,   c                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )Ú_UFuncCastingErrorc                 óN   •— t         ‰| �  |«       || _        || _        || _        y r   )r   r   ÚcastingÚfrom_Úto)r   r   r4   r5   r6   r#   s        €r   r   z_UFuncCastingError.__init__E   s%   ø€ Ü‰Ñ˜ÔØˆŒØˆŒ
Øˆ�r	   )r   r   r   r   r)   r*   s   @r   r2   r2   C   s   ø„ ÷ð r	   r2   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                 ó8   •— t         ‰| �  ||||«       || _        y r   )r   r   Úin_i©r   r   r4   r5   r6   Úir#   s         €r   r   z _UFuncInputCastingError.__init__O   s   ø€ Ü‰Ñ˜ ¨°Ô3Øˆ�	r	   c           
      óÜ   — | j                   j                  dk7  r| j                  › d�nd}d| j                   j                  ›d|› d| j                  ›d| j
                  ›d| j                  ›�
S )	Nr   Ú Ú úCannot cast ufunc z input úfrom ú to ú with casting rule )r   r%   r:   r   r5   r6   r4   ©r   Úi_strs     r   r'   z_UFuncInputCastingError.__str__S   sf   € à#'§:¡:§>¡>°QÒ#6�4—9‘9�+˜Q‘¸Bˆà  §¡×!4Ñ!4Ð 7°w¸u¸gÀUØ�z‰zˆn˜D §¡ Ð+>¸t¿|¹|Ð>NðPð	
r	   r(   r*   s   @r   r8   r8   L   s   ø„ á6ôö
r	   r8   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                 ó8   •— t         ‰| �  ||||«       || _        y r   )r   r   Úout_ir;   s         €r   r   z!_UFuncOutputCastingError.__init___   s   ø€ Ü‰Ñ˜ ¨°Ô3Øˆ�
r	   c           
      óÜ   — | j                   j                  dk7  r| j                  › d�nd}d| j                   j                  ›d|› d| j                  ›d| j
                  ›d| j                  ›�
S )	Nr   r>   r?   r@   z output rA   rB   rC   )r   ÚnoutrI   r   r5   r6   r4   rD   s     r   r'   z _UFuncOutputCastingError.__str__c   sg   € à$(§J¡J§O¡O°qÒ$8�4—:‘:�,˜aÑ ¸bˆà  §¡×!4Ñ!4Ð 7°xÀ¸wÀeØ�z‰zˆn˜D §¡ Ð+>¸t¿|¹|Ð>NðPð	
r	   r(   r*   s   @r   rG   rG   \   s   ø„ á7ôö
r	   rG   c                   ó<   — e Zd ZdZd„ Zed„ «       Zed„ «       Zd„ Z	y)Ú_ArrayMemoryErrorz) Thrown when an array cannot be allocatedc                 ó    — || _         || _        y r   )ÚshapeÚdtype)r   rO   rP   s      r   r   z_ArrayMemoryError.__init__o   s   € ØˆŒ
Øˆ�
r	   c                 ó^   — | j                   j                  }| j                  D ]  }||z  }Œ	 |S r   )rP   ÚitemsizerO   )r   Ú	num_bytesÚdims      r   Ú_total_sizez_ArrayMemoryError._total_sizes   s/   € à—J‘J×'Ñ'ˆ	Ø—:”:ˆCØ˜Ñ‰Ið àÐr	   c                 óV  — d}d}g d¢}t        | j                  «       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›d|› �S t        |«      dk  r|d	›d|› �S |d
›d|› �S )z5 Convert a number of bytes into a binary size string é
   i   )ÚbytesÚKiBÚMiBÚGiBÚTiBÚPiBÚEiBr   r   z.0fr>   iè  z#.3gz#.0f)ÚmaxÚ
bit_lengthÚroundr   )	rS   Ú	LOG2_STEPÚSTEPÚunitsÚunit_iÚunit_valÚn_unitsÚ
new_unit_iÚ	unit_names	            r   Ú_size_to_stringz!_ArrayMemoryError._size_to_stringz   sþ   € ð
 ˆ	ØˆÚCˆä�Y×)Ñ)Ó+¨aÑ/°Ó3°yÑ@ˆØ˜ )Ñ+Ñ,ˆØ˜hÑ&ˆØô �‹>˜TÒ!Ø�a‰KˆFØ�t‰OˆGð ”S˜“ZÒÜ˜U› a™ˆJØ�q˜f zÑ1°YÑ>Ñ?Ñ?ˆGØˆFà˜&‘Mˆ	à�QŠ;à˜c�] ! I ;Ð/Ð/Ü�7‹^˜dÒ"à˜d�^ 1 Y KÐ0Ð0ð ˜d�^ 1 Y KÐ0Ð0r	   c                 óv   — | j                  | j                  «      }d|› d| j                  › d| j                  › �S )NzUnable to allocate z for an array with shape z and data type )rj   rU   rO   rP   )r   Úsize_strs     r   r'   z_ArrayMemoryError.__str__Ÿ   s?   € Ø×'Ñ'¨×(8Ñ(8Ó9ˆØ% h ZÐ/HØ—:‘:�,˜o¨d¯j©j¨\ð;ð 	<r	   N)
r   r   r   r   r   ÚpropertyrU   Ústaticmethodrj   r'   r   r	   r   rM   rM   l   s8   „ á3òð ñó ðð ñ"1ó ð"1óH<r	   rM   N)r   r   r   Ú	TypeErrorr   r   r,   r2   r8   rG   ÚMemoryErrorrM   r   r	   r   Ú<module>rq      sÅ   ðñòòô�Yô ð ô
˜ó 
ó ð
ð ô
Ð"3ó 
ó ð
ð ô˜ó ó ðð ô
Ð0ó 
ó ð
ð ô
Ð1ó 
ó ð
ð ô5<˜ó 5<ó ñ5<r	   