+
    ei  c                   s   R t ^ RIHt ^ RIt^ RIHt  ! R R4      tR tRR lt	R	R
RRRR/R lt
]R8X  Ed   ]! R4       ]! ]P                  R,          4       ]! 4        ]! R4       ]! 4        ]! R4       ]	! ]P                  R,          ^ ^ R4       ]! 4        ]! R4       ]	! ]P                  R,          ^ RR4       ]! 4        ]! R4       ]	! ]P                  R,          ^ ^ R
4       ]! 4        ]! R4       ]	! ]P                  R,          ^ RR
4       ]! 4        ]! R4       ]	! ]P                  R,          ^ ^ RR
4       ]! R4       ]
! R
R
R
R7       R# R# )z:Prints type-coercion tables for the built-in NumPy types

)
namedtupleN)
obj2sctypec                   sV   a  ] tR t^t o R tR tR t]P                  ! R4      tRt	V t
R# )GenericObjectc                s    Wn         R # Nv)selfr      &&J/usr/lib64/python3.14/site-packages/numpy/testing/print_coercion_tables.py__init__ZGenericObject.__init__   s        c                    V # r    r   Zotherr   r   __add__ZGenericObject.__add__       r
   c                r   r   r   r   r   r   __radd__ZGenericObject.__radd__   r   r
   Or   N)__name__Z
__module__Z__qualname__Z__firstlineno__r	   r   r   npdtypeZ__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s#      HHSMEr
   r   c                 s   \        R RR7       V  F  p\        VRR7       K  	  \        4        V  F  p\        VRR7       V  F  p\        P                  ! W#R4      '       d   RpMb\        P                  ! W#R4      '       d   RpMB\        P                  ! W#R4      '       d   RpM"\        P                  ! W#R	4      '       d   R
pMRp\        VRR7       K  	  \        4        K  	  R# )X ZendZequiv#Zsafe=Z	same_kind~Zunsafe.N)printr   can_cast)ntypescharrowcolcasts   &    r   print_cancast_tabler#      s    	#3d 	GcsC{{3W--Sv..S{33Sx00$C   	 r
   Fc                 sr   \        R RR7       V  F  p\        VRR7       K  	  \        4        V  EFS  pVR8X  d   \        pM\        V4      p\        VRR7       V  EF  pVR8X  d   \        p	M\        V4      p	 V'       d!   \        P                  ! V! V4      .VR7      p
MV! V4      p
V	! V4      pV'       d7   \        P
                  ! V
P                  VP                  4      P                  pMw\        P                  ! W4      p\        V\        P                  4      '       d   VP                  P                  pM*\        P                  ! \        V4      4      P                  p \        VRR7       EK  	  \        4        EKV  	  R#   \         d    Rp L2\         d    Rp L@\         d    Rp LNi ; i)	Z+r   r   r   )r   Z!Z@r   N)r   r   r   r   Zarraypromote_typesr   r   addZ
isinstanceZndarraytype
ValueErrorZOverflowErrorZ	TypeError)r   ZinputfirstvalueZinputsecondvalueZ
firstarrayZuse_promote_typesr   r    Zrowtyper!   ZcoltypeZrowvalueZcolvalueZvalues   &&&&&        r   print_coercion_tabler(   -   sR   	#3d 	G#:#G oGcsCcz'$S/!xx)A(B'RH&7H"#34$++HNNHNNKPPDFF86E!%44${{//!xxU499 $C  3 4 	C 4     sC   :F
7F
:5F
0AF
=)F

F6F6"F6'F60F65F6r   Tlegacyflagsc                sZ  aaaa ^ RI Hp R&R^ R^R^R^R^R/p^ R^R^R	^R
^R^R^R^R/p\        R. RO4      pV! RRR4      oV! 4       p/ o\        4       oV F  pSP	                  VR,          4       SP	                  VR,          4       VR,          S9  d   / SVR,          &   SVR,          ,          p	WHR,          ,          p VR,          '       d   RMRp^ pVR,          '       d
   V^,          pVR,          '       d
   V^,          pVR,          '       d
   V^,          pWR,          pV! WVR7      WR,          &   K  	  \
        P                  R,          oV3R lp
\        SV
R7      oR'VVV3R llpV '       d(   \        4        \        R4       \        4        V! R4       V'       d(   \        4        \        R 4       \        4        V! R4       V'       dR   \        4        \        V^ ,           R!V^,           R"V^,           R#V^,           R$24       \        4        V! R4       R%# R%# )(zSPrints new casts, the values given are default "can-cast" values, not
actual ones.
)get_all_cast_informationr   r   r   r   r   u   ▗u   █u   ▚u   ▐u   ▄u   ▜u   ▙u   ▟	cast_infor   r)   r*   ZfromZtoZcastingZLZrequires_pyapiZsupports_unalignedZno_floatingpoint_errorsr   r)   r*   Allc                 s   < \         P                  ! V P                  4      p SP                  VP                  4      pW!P                  3#   \
         d    \         P                  p L*i ; ir   )r   r   r&   Zindexr   r'   Zinf)Zxr   Zindxtypess   &  r   sorterZ$print_new_cast_table.<locals>.sorter   sW      	;;uzz*D jj!!  	66D	s   A A)(A))Zkeyc           
      s  < \        R RR7       S F8  p\        \        P                  ! VP                  4      P                  RR7       K:  	  \        4        S F  p\        \        P                  ! VP                  4      P                  RR7       SP                  V/ 4      pS F*  p\        \        VP                  VS4      V 4      RR7       K,  	  \        4        K  	  R# )r   r   r   N)r   r   r   r&   r   ZgetZgetattr)ZfieldZdtZfrom_dtr    Zto_dtdtypesno_cast_infotables   &    r   print_tableZ)print_new_cast_table.<locals>.print_table   s    csB"((277#((c2 G"((7<<(--37))GR(Cgcgge\:EBL  G r
   zDCasting: # is equivalent, = is safe, ~ is same-kind, and . is unsafez+L denotes a legacy cast . a non-legacy one.z: no flags, z	: PyAPI, z: supports unaligned, z: no-float-errorsN)r   )	Znumpy._core._multiarray_testsr+   r    Zsetr%   r   	typecodesZsortedr   )r   r)   r*   r+   Z
cast_tableZflags_tabler,   Zcastsr"   Zto_dictr0   r4   r1   r2   r3   r/   s   $$$         @@@@r   print_new_cast_tabler7   W   s     G 	C	3	3	3	3	3J 	
5!U	5!UAu5!U5	K ;(GHIS#s+L$&EEUF

4< 

4:<u$"$E$v,V%9o.XC !!QJE$%%QJE)**QJE"'PUVT
' . LLE" F'F
 
 TUJ;<HQ Q 	Q  6Q  13 	4 	G r
   Z__main__zcan castr.   zJIn these tables, ValueError is '!', OverflowError is '@', TypeError is '#'zscalar + scalarzscalar + neg scalarzarray + scalarzarray + neg scalarr$   zNew casting type promotion:r-   )Fr5   )Z__doc__Zcollectionsr    Znumpyr   Znumpy._core.numerictypesr   r   r#   r(   r7   r   r   r6   r   r
   r   <module>r8      sN   #  /
 
*'T`T `% `u `F z	*U+,	G	
VW	G	
e,aE:	G	
 e,aU;	G	
e,aD9	G	
e,aT:	G	/e,aE4@	
'($t4@+ r
   