+
    JV-jå'  ã                   ó:  € R t ^ RIt^ RIt^ RIHu Ht ^ RIt^ RIHt ^ RIH	t	H
t
HtHtHt ^RIHtHtHtHtHtHt . ROt^ RIHt . ROt]],           tRR ltRR ltRR ltR	 tRR
 ltRR lt]t RR lt!]!t"RR lt#RR lt$RR lt%RR lt&RR lt'RR lt(RR lt)R# )z…Miscellaneous functions for testing masked arrays and subclasses

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu

N)Úndarray)Úassert_Úassert_allcloseÚassert_array_almost_equal_nulpÚassert_raisesÚbuild_err_msg)ÚfilledÚgetmaskÚmask_orÚmaskedÚmasked_arrayÚnomask)ÚTestCasec                ó¶  € \        \        V 4      \        V4      4      p\        V 4      p\        V4      pVP                  P                  R8X  g   VP                  P                  R8X  d%   \
        P                  ! Wg4      P                  4       # \        \        VRVR7      V4      P                  \
        P                  4      p\        \        VRVR7      ^4      P                  \
        P                  4      p	\
        P                  ! \        P                  ! W‰,
          4      WC\        P                  ! V	4      ,          ,           4      p
V
P                  4       # )aj  
Returns true if all components of a and b are equal to given tolerances.

If fill_value is True, masked values considered equal. Otherwise,
masked values are considered unequal.  The relative error rtol should
be positive and << 1.0 The absolute error atol comes into play for
those elements of b that are very small or zero; it says how small a
must be also.

ÚOF©ÚcopyÚmask)r
   r	   r   ÚdtypeÚcharÚnpÚequalÚravelr   ÚastypeÚfloat64Ú
less_equalÚumathÚabsolute)ÚaÚbÚ
fill_valueÚrtolÚatolÚmÚd1Úd2ÚxÚyÚds   &&&&&      Úc/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/numpy/ma/testutils.pyÚapproxr*   -   sè   € ô 	”˜“
œG A›JÓ'€AÜ	�‹€BÜ	�‹€BØ	‡x�x‡}�}˜Ô˜rŸx™xŸ}™}°Ô3Ü�xŠx˜Ó×%Ñ%Ó'Ð'ÜÜ�R˜e¨!Ô,¨jó	ç�fŒR�Z‰ZÓð ô 	Œ|˜B U°Ô3°QÓ7×>Ñ>¼r¿z¹zÓJ€AÜ
�Š”e—n’n Q¥UÓ+¨T¼5¿>º>È!Ó;LÕ4LÕ-LÓM€AØ�7‰7‹9Ðó    c                óŠ  € \        \        V 4      \        V4      4      p\        V 4      p\        V4      pVP                  P                  R8X  g   VP                  P                  R8X  d%   \
        P                  ! WV4      P                  4       # \        \        VRVR7      V4      P                  \
        P                  4      p\        \        VRVR7      ^4      P                  \
        P                  4      p\
        P                  ! \
        P                  ! Wx,
          4      V4      RV) ,          8*  p	V	P                  4       # )z£
Returns True if a and b are equal up to decimal places.

If fill_value is True, masked values considered equal. Otherwise,
masked values are considered unequal.

r   Fr   ç      $@)r
   r	   r   r   r   r   r   r   r   r   r   ÚaroundÚabs)
r   r   Údecimalr    r#   r$   r%   r&   r'   r(   s
   &&&&      r)   Úalmostr1   E   sâ   € ô 	”˜“
œG A›JÓ'€AÜ	�‹€BÜ	�‹€BØ	‡x�x‡}�}˜Ô˜rŸx™xŸ}™}°Ô3Ü�xŠx˜Ó×%Ñ%Ó'Ð'ÜÜ�R˜e¨!Ô,¨jó	ç�fŒR�Z‰ZÓð ô 	Œ|˜B U°Ô3°QÓ7×>Ñ>¼r¿z¹zÓJ€AÜ
�	Š	”"—&’&˜�“- Ó)¨T°w°hÕ-?Ñ?€AØ�7‰7‹9Ðr+   c           	     óº   € \        \        V 4      \        V4      V4       \        \        V4      4       F#  p\        W,          W,          RV: RV 24       K%  	  R# )z3
Asserts the equality of two non-array sequences.

úitem=Ú
N)Úassert_equalÚlenÚrange)ÚactualÚdesiredÚerr_msgÚks   &&& r)   Ú_assert_equal_on_sequencesr<   Z   sH   € ô
 ”�V“œc '›l¨GÔ4Ü”3�w“<Ö ˆÜ�V•Y ¥
¨e°A±5¸¸7¸)Ð,DÖEó !r+   c                ón  € \        V P                  VP                  4       V P                  P                   Fz  p\        P                  ! W4      \        P                  ! W4      rCV\
        J d   K:  V\
        J d   KF  \        \        P                  ! W4      \        P                  ! W4      4       K|  	  R# )z=
Asserts that two records are equal.

Pretty crude for now.

N)r5   r   ÚnamesÚoperatorÚgetitemr   )r   r   ÚfÚafÚbfs   &&   r)   Úassert_equal_recordsrD   d   sr   € ô �—‘˜!Ÿ'™'Ô"Ø�W‰W�]Œ]ˆÜ×$Ò$ QÓ*¬H×,<Ò,<¸QÓ,BˆRØ”f• r¬V¥|Üœ×)Ò)¨!Ó/´×1AÒ1AÀ!Ó1GÖHó r+   c           	     ó2  € \        V\        4      '       d”   \        V \        4      '       g   \        \        \	        V 4      4      4      h\        \        V 4      \        V4      V4       V F9  pW09  d   \        V RV  24      h\        W,          W,          RV: RV 24       K;  	  R# \        V\        \        34      '       d*   \        V \        \        34      '       d   \        WRR7      # \        V \        4      '       g7   \        V\        4      '       g!   \        W.V4      pW8X  g   \        V4      hR# V \        J d   V\        J d   V\        J d&   V \        J g   \        W.VRR	R7      p\        V4      h\        P                  ! V 4      p \        P                  ! V4      pV P                   VP                   reVP"                  R8X  d<   VP"                  R8X  d+   \        V P%                  4       VP%                  4       RR7      # \'        WV4      # )
z$
Asserts that two items are equal.

z not in úkey=r4   NÚ ©r:   )Úheaderr>   ÚS©r&   r'   )Ú
isinstanceÚdictÚAssertionErrorÚreprÚtyper5   r6   ÚlistÚtupler<   r   r   r   Ú
ValueErrorr   Ú
asanyarrayr   r   ÚtolistÚassert_array_equal)r8   r9   r:   r;   ÚmsgÚactual_dtypeÚdesired_dtypes   &&&    r)   r5   r5   r   s­  € ô �'œ4× Ò Ü˜&¤$×'Ò'Ü ¤¤d¨6£lÓ!3Ó4Ð4Ü”S˜“[¤# g£,°Ô8ÛˆAØŒÜ$¨ s¨(°6°(Ð%;Ó<Ð<Ü˜� G¥J°$°q±e¸2¸g¸YÐ0GÖHñ ñ 	ä�'œD¤%˜=×)Ò)¬j¸Ä$ÌÀ×.OÒ.OÜ)¨&À2ÔFÐFÜ�vœw×'Ò'¬:°g¼w×+GÒ+GÜ˜VÐ-¨wÓ8ˆØÔ Ü  Ó%Ð%Ùà	”6Ó	 G¬vÓ$5ØœÓ¨&´FÓ*:Ü˜VÐ-Ø#¨B°jôBˆä˜‹oÐÜ�]Š]˜6Ó"€FÜ�mŠm˜GÓ$€GØ%+§\¡\°7·=±=�=Ø×Ñ˜CÔ M×$6Ñ$6¸#Ô$=Ü)¨&¯-©-«/Ø*1¯.©.Ó*:Ø24ô6ð 	6ô ˜f¨wÓ7Ð7r+   c           	     ó\  € \        V\        4      '       d˜   \        V \        4      '       g   \        \        \	        V 4      4      4      h\        \        V 4      \        V4      V4       V F=  pW09  d   \        \        V4      4      h\        W,          W,          RV: RV 24       K?  	  R# \        V\        \        34      '       dy   \        V \        \        34      '       d]   \        \        V 4      \        V4      V4       \        \        V4      4       F#  p\        W,          W,          RV: RV 24       K%  	  R# \        V \        P                  4      '       g!   \        V\        P                  4      '       d   \        WV4      # \        W.V4      pW8w  g   \        V4      hR# )z4
Raises an assertion error if two items are equal.

rF   r4   Nr3   )rL   rM   rN   rO   rP   Úfail_if_equalr6   rQ   rR   r7   r   r   Úfail_if_array_equalr   )r8   r9   r:   r;   rW   s   &&&  r)   r[   r[   ™   sA  € ô
 �'œ4× Ò Ü˜&¤$×'Ò'Ü ¤¤d¨6£lÓ!3Ó4Ð4Ü”c˜&“k¤3 w£<°Ô9ÛˆAØŒÜ$¤T¨!£WÓ-Ð-Ü˜&�) W¥Z°4¸±u¸B¸w¸iÐ1HÖIñ ñ 	Ü�'œD¤%˜=×)Ò)¬j¸Ä$ÌÀ×.OÒ.OÜ”c˜&“k¤3 w£<°Ô9Ü”s˜7“|Ö$ˆAÜ˜&�) W¥Z°5¸¹¸RÀ¸yÐ1IÖJñ %áÜ�&œ"Ÿ*™*×%Ò%¬°G¼R¿Z¹Z×)HÒ)HÜ" 6°GÓ<Ð<Ü
˜Ð)¨7Ó
3€CØÔÜ˜SÓ!Ð!ñ r+   c                ó  € \        V \        P                  4      '       g!   \        V\        P                  4      '       d   \        WVW4R7      # \	        W.W4R7      p\        \        W,
          4      V4      ^ 8X  g   \        V4      hR# )zr
Asserts that two items are almost equal.

The test is equivalent to abs(desired-actual) < 0.5 * 10**(-decimal).

)r0   r:   Úverbose)r:   r^   N)rL   r   r   Úassert_array_almost_equalr   Úroundr/   rN   )r8   r9   r0   r:   r^   rW   s   &&&&& r)   Úassert_almost_equalra   ¶   st   € ô �&œ"Ÿ*™*×%Ò%¬°G¼R¿Z¹Z×)HÒ)HÜ(¨À'Ø18ôKð 	Kä
˜Ð)Ø 'ô:€Cä”�WÕ%Ó&¨Ó0°AÔ5Ü˜SÓ!Ð!ñ 6r+   c           	     óˆ  € \        \        V4      \        V4      4      p\        VRVRRR7      p\        VRVRRR7      pV\        J d   V\        J d   V\        J d&   V\        J g   \	        W.W4VRR7      p\        V4      h\        P                  P                  V VP                  V4      VP                  V4      VWER7      # )zb
Asserts that comparison between two masked arrays is satisfied.

The comparison is elementwise.

F)r   r   Ú	keep_maskÚsubok)r:   r^   rI   r>   ©r:   r^   rI   rK   )
r
   r	   r   r   r   rS   r   ÚtestingÚassert_array_comparer   )	Ú
comparisonr&   r'   r:   r^   rI   r    r#   rW   s	   &&&&&&&  r)   rg   rg   É   s³   € ô 	”˜“
œG A›JÓ'€AÜ�Q˜U¨°eÀ5ÔI€AÜ�Q˜U¨°eÀ5ÔI€AØ	
Œf‹˜q¤F›{Ø”6‹k A¬£KÜ˜Q˜F¨GØ#)°ô=ˆä˜‹oÐä�:‰:×*Ñ*¨:Ø+,¯8©8°JÓ+?Ø+,¯8©8°JÓ+?Ø3:Ø3:ð	 +ó Kð Kr+   c           	     ó@   € \        \        P                  WW#RR7       R# )z8
Checks the elementwise equality of two masked arrays.

úArrays are not equalre   N)rg   r?   Ú__eq__©r&   r'   r:   r^   s   &&&&r)   rV   rV   â   s   € ô
 œŸ™¨!Ø!(Ø 6÷8r+   c           	     ó*   € R p\        W@WVRR7       R# )zL
Raises an assertion error if two masked arrays are not equal elementwise.

c                 óJ   € \         P                  ! \        W4      4      '       * # )N)r   Úallr*   rK   s   &&r)   ÚcompareÚ$fail_if_array_equal.<locals>.compareñ   s   € Ü—F’Fœ6 !›<Ó(Ô(Ð)r+   rj   re   N©rg   )r&   r'   r:   r^   rp   s   &&&& r)   r\   r\   ì   s   € ò
*ä˜ QÀØ 6÷8r+   c           	     ó2   a€ V3R lp\        WPWVRR7       R# )úp
Checks the equality of two masked arrays, up to given number odecimals.

The equality is checked elementwise.

c                ó.   <€ \        WRS) ,          R7      # )ú<Returns the result of the loose comparison between x and y).r-   )r!   )r*   ©r&   r'   r0   s   &&€r)   rp   Ú*assert_array_approx_equal.<locals>.compareþ   s   ø€ ä�a ¨¨¥Ô1Ð1r+   úArrays are not almost equalre   Nrr   ©r&   r'   r0   r:   r^   rp   s   &&f&& r)   Úassert_array_approx_equalr{   ÷   s   ø€ õ2ô ˜ QÀØ =÷?r+   c           	     ó2   a€ V3R lp\        WPWVRR7       R# )rt   c                ó   <€ \        WS4      # )rv   )r1   rw   s   &&€r)   rp   Ú*assert_array_almost_equal.<locals>.compare  s   ø€ ä�a˜GÓ$Ð$r+   ry   re   Nrr   rz   s   &&f&& r)   r_   r_     s   ø€ õ%ô ˜ QÀØ =÷?r+   c           	     ó@   € \        \        P                  WW#RR7       R# )z/
Checks that x is smaller than y elementwise.

zArrays are not less-orderedre   N)rg   r?   Ú__lt__rl   s   &&&&r)   Úassert_array_lessr�     s   € ô
 œŸ™¨!Ø!(Ø =÷?r+   c                óŒ   € V \         J d   \        V\         J 4       V\         J d   \        V \         J 4       \        WVR7       R# )z%
Asserts the equality of two masks.

rH   N)r   r   rV   )Úm1Úm2r:   s   &&&r)   Úassert_mask_equalr…     s4   € ð
 
ŒVƒ|Ü�”f�ÔØ	ŒVƒ|Ü�”f�ÔÜ�r w×/r+   )r1   r*   ra   r_   r{   rg   rV   r�   Úassert_closer5   rD   r…   Úassert_not_equalr\   )r   r   r   r   r   )Tgñhãˆµøä>g:Œ0âŽyE>)é   T)rG   )é   rG   T)rG   TrG   T)rG   T)rˆ   rG   T)*Ú__doc__r?   Únumpyr   Únumpy._core.umathÚ_corer   Únumpy.testingr   r   r   r   r   r   Úcorer   r	   r
   r   r   r   Ú__all__maskedÚunittestr   Ú__some__from_testingÚ__all__r*   r1   r<   rD   r5   r[   r‡   ra   r†   rg   rV   r\   r{   r_   r�   r…   © r+   r)   Ú<module>r•      s«   ðñó ã ß !Ð !Û Ý ÷õ ÷ I× Hò€õ òÐ ð
 Ð.Õ
.€ôô0ô*FòIô$8ôN"ð4 !Ð ô"ð  #€ôKô28ô8ô?ô?ô?ö	0r+   