+
     ]i2  c                   s*   ^ RI t^ RIt^ RIHt R tR tR tRR ltRR lt	RR lt
 ! R	 R
4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R4      t ! R R]4      t ! R R]4      tR# )    N)ExtremeFinderSimplec                    . ROp. ROpR.\        V4      ,          p. ROp. ROp\        P                  ! V4      ^<,          pR.\        V4      ,          p\        P                  ! V4      R,          pR.\        V4      ,          p	. VOVOVOp
. VOVOVOp. V	OVOVOp\        P                  ! W4      pW,          pW<,          pW3# )	      ?      ?      N@        @)
r         i      i(   iF   ix   i  i  )
         
         -   Z   i   ih  )r         @      @            r   )r   r   r   r   r   r   r
   r   lennparrayZsearchsorted)dvZdegree_limits_Zdegree_steps_Zdegree_factorsminsec_limits_minsec_steps_minute_limits_minute_factorssecond_limits_second_factorsZdegree_limitsZdegree_stepsnstepfactor   &              K/usr/lib64/python3.14/site-packages/mpl_toolkits/axisartist/angle_helper.pyselect_step_degreer)      s    ?N?MTC..N7N7MXXn-2NUS00NXXn-4NWs>22NGnG~GGMC]C]C]CLH~HHHN
*A?DF<    c                 r   )	r   r   r   r   r   )	r   r   r   r   r	   r   r   i   i$   )	r   r   r         r      r   i   )r   r   r   g      @g      @r   r   i   r   r   r   )r   r   r   r+   r   r,   r   r-   r   r
   r   r   )r   Zhour_limits_Zhour_steps_Zhour_factorsr   r   r    r!   r"   r#   Zhour_limitsZ
hour_stepsr$   r%   r&   r'   r(   select_step_hourr.   !   s    8L8K4#k**LENEMXXn-2NUS00NXXn-4NWs>22NCNC^ClCK?=?=?;?JD^DnD|DL
(A=D_F<r*   c                 s    R \        \        P                  ! V 4      4      R,
          ,          pRV,          pRV,          V 8  d   ^pW23# RV,          V 8  d   ^pW23# RV,          V 8  d   ^pW23# ^pRV,          pW23# )g      $@r   r   g      @g      @g?)intmathlog10)r   Ztmpr&   r%   s   &   r(   select_step_subr2   ;   s     DJJrN#B&
'CVF
3w"} < 
C2 < 
C2
 < V<r*   c                 s<   W8  d   YrW,
          V,          pV'       d
   \         pR pM\        pRpV^V,          8  d   V! V4      w  rM\        We,          4      w  rW,          p
\        P                  ! \        P
                  ! W
,          V	,          4      \        P                  ! W,          V	,          4      R,           \        R7      V	,          p\        V4      pV
R8X  d   VR,          V^ ,          V,           8  d   \        W,          4      pV'       d6   V^ ,          \        P                  ! ^ V^,           ^4      V	,          ,           pM-V^ ,          \        P                  ! ^ V^4      V	,          ,           p\        V4      p\        P                  ! V4      W3# )g      8@     v@g      ?)Zdtyper   )
r.   r)   r2   r   ZarangefloorZceilr/   r   r   )v1v2nvhourinclude_lastthreshold_factorr   Z_select_stepZcycler%   r&   levsr$   s   &&&&&&       r(   select_stepr=   O   s>    
wB
'RB') 
A   #B'f&r':;*99RXXbkD01WWR[4/036 "&'D 	D	A
 |RDGeO37RYYq"Q$2T99D7RYYq"a0477DI88D>1$$r*   c           	      s`    V ^,          V^,          r\        WVRVVR7      w  rVpV^,          Wg3# )r   Tr9   r:   r;   r=   )r6   r7   r8   r:   r;   r<   r$   r&   s   &&&&&   r(   select_step24r@      s=    "Wb2g!""4/;3CEODV "9ar*   c           	      s"    \        WVR VVR7      # )Fr>   r?   )r6   r7   r8   r:   r;   s   &&&&&r(   select_step360rA      s    rr$0(8: :r*   c                   s4   a  ] tR t^t o RR ltRR ltRtV tR# )LocatorBasec                s    Wn         W n        R # N)nbins_include_last)selfrD   r:      &&&r(   __init__ZLocatorBase.__init__   s    
)r*   Nc                s2    Ve   \        V4      V n        R # R # rC   )r/   rD   )rF   rD   s   &&r(   
set_paramsZLocatorBase.set_params   s    UDJ r*   )rE   rD   )TrC   )__name__
__module____qualname____firstlineno__rH   rI   __static_attributes____classdictcell____classdict__   @r(   rB   rB      s     *$ $r*   rB   c                   s&   a  ] tR t^t o R tRtV tR# )
LocatorHMSc                D    \        WV P                  V P                  4      # rC   r@   rD   rE   rF   r6   r7   rG   r(   __call__ZLocatorHMS.__call__   s    RTZZ1C1CDDr*    NrJ   rK   rL   rM   rW   rN   rO   rP   rR   r(   rS   rS      s     E Er*   rS   c                   s&   a  ] tR t^t o R tRtV tR# )	LocatorHMc                H    \        WV P                  V P                  ^<R7      # <   r;   rU   rV   rG   r(   rW   ZLocatorHM.__call__   s"    RTZZ1C1C.02 	2r*   rX   NrY   rP   rR   r(   rZ   rZ           2 2r*   rZ   c                   s&   a  ] tR t^t o R tRtV tR# )LocatorHc                H    \        WV P                  V P                  ^R7      # r   r^   rU   rV   rG   r(   rW   ZLocatorH.__call__   s"    RTZZ1C1C./1 	1r*   rX   NrY   rP   rR   r(   r`   r`      s     1 1r*   r`   c                   s&   a  ] tR t^t o R tRtV tR# )
LocatorDMSc                rT   rC   rA   rD   rE   rV   rG   r(   rW   ZLocatorDMS.__call__   s    bdjj$2D2DEEr*   rX   NrY   rP   rR   r(   rc   rc      s     F Fr*   rc   c                   s&   a  ] tR t^t o R tRtV tR# )	LocatorDMc                r[   r\   rd   rV   rG   r(   rW   ZLocatorDM.__call__   s"    bdjj$2D2D/13 	3r*   rX   NrY   rP   rR   r(   re   re      s     3 3r*   re   c                   s&   a  ] tR t^t o R tRtV tR# )LocatorDc                ra   rb   rd   rV   rG   r(   rW   ZLocatorD.__call__   s"    bdjj$2D2D/02 	2r*   rX   NrY   rP   rR   r(   rf   rf      r_   r*   rf   c                   sl  a  ] tR t^t o RtRtRtR],           R,           tR],           R,           tR],           R,           ],           R,           t	R],           R	,           ],           R,           t
R],           R,           ],           R
,           tR],           R,           tR],           R,           tR tR tRtV tR# )FormatterDMSz^{\circ}z	^{\prime}z^{\prime\prime}$%d$$%d.%s$%s%d\,%02d	\,%02d.%s\,%02d%02d.%sc                s   R pR Fv  pW8:  d    W3# W,          p\        \        P                  ! \        P                  ! V4      4      4      p^
V,          V8X  g   KX  V^8w  g   Ka  TpV^
V,          ,          pW3u # 	  W3# )N)r   r]   r   )r/   r   r5   r1   )rF   r&   number_fractionZ	thresholdZdZ	int_log_ds   &&    r(   _get_number_fractionZ!FormatterDMS._get_number_fraction   s     'I" && #ABHHRXXa[12I9}!a1f"+2y=0.. ' &&r*   c                s   \        V4      ^ 8X  d   . # \        P                  ! V4      pV Uu. uF  qU^ 8  d   RMRNK  	  ppV P                  V4      w  r'\        P                  ! V4      pVe8   \        V^
V,          4      w  r8RV3,          p	V U
u. uF  qV
3,          NK  	  pp
V^8X  d   VfB   \        WC4       UUu. uF)  w  rV P                  V\        V4      ,          3,          NK+  	  upp# \        WCX4       UUU
u. uF+  w  rp
V P                  V\        V4      ,          V
3,          NK-  	  up
pp# V^<8X  d   \        V^<4      w  rVf9   \        WmV4       UUUu. uF  w  pppV P                  VVV3,          NK  	  uppp# \        WmVX4       UUUU
u. uF  w  pppp
V P                  VVVV
3,          NK!  	  up
ppp# VR8X  Ed   VR
,          R
8X  d   RpVRRR
1,          pVRRR
1,          pMRpRp. p\        VR4      w  pp\        V^<4      w  ppVf$   V Uu. uF  qP                  V3,          NK  	  ppM1\        VX4       UU
u. uF  w  rV P                  W3,          NK  	  ppp
\        WmVV4       FR  w  ppppV P                  VVV3,          pVV8w  d   TpVV,           pMRV,           V,           pVP                  V4       KT  	  V'       d   VRRR
1,          # V# WC,           Uu. uF  pR	V,          NK  	  up# u upi u up
i u uppi u up
ppi u upppi u up
pppi u upi u up
pi u upi )r    Z-Z Nz%%0%ddr   TFri   z$%s^{\circ}$r4   )r   r   Zsignrr   ZabsZdivmodZzipfmt_dr/   fmt_dsfmt_d_mfmt_d_msfmt_s_partialfmt_ss_partialfmt_d_m_partialZappend)rF   	directionr&   valuesZssZvZsignsrq   Z	frac_partZfrac_fmtZf1Zfrac_strZsZdeg_partZmin_partZs1Zd1Zm1Zinverse_orderZl_hm_oldZrZ	min_part_Zsec_partZsec_strZl_hmZls   &&&&                      r(   rW   ZFormatterDMS.__call__   sk   v;!IWWV_/56v!A2%v6"&";";F"C& &vr_/D EF?"44H3<=9RB5((9H=Q;&?B2Otq

a#a&j]22OO ),B(AC(AHA" q3q6z2&666(AC Cr\!'!3H&*-ex*HJ*HJBB B|33*HJ J
 u(CEC *Ar2r BB77CE E t^"v| $"dd %HA"("6Hi!'	2!6Hh&@HI"--55I *-Xx)@B)@vr  .."99)@  B "%Uh!H2r2++q"bk98##Hr	Aa"A "I 2w 24;AOa'';;} 7 > PC
JE& JB$ <s5   LL?/L1L!#L"%L)
#L1L66L<rX   N)rJ   rK   rL   rM   deg_markmin_marksec_markrs   rt   ru   rv   ry   rw   rx   rr   rW   rN   rO   rP   rR   r(   rg   rg      s     HH!HHs"E!C'F !I-83>G("\1H<sBH(94x?%GOX%+M)C/N'$C< C<r*   rg   c                   sr  a a ] tR tRt oRtRtRtR],           R,           tR],           R,           tR],           R	,           ],           R,           t	R],           R
,           ],           R,           t
R],           R	,           ],           R,           tR],           R,           tR],           R,           tV 3R ltRtVtV ;t# )FormatterHMSi"  z^\mathrm{h}z^\mathrm{m}z^\mathrm{s}rh   ri   rj   rk   rl   rm   rn   ro   rp   c                sZ   < \         SV `  W\        P                  ! V4      ^,          4      # )r   )ZsuperrW   r   Zasarray)rF   rz   r&   r{   	__class__s   &&&&r(   rW   ZFormatterHMS.__call__2  s#    w	2::f3E3JKKr*   rX   )rJ   rK   rL   rM   r|   r}   r~   rs   rt   ru   rv   ry   rw   rx   rW   rN   rO   Z__classcell__)r   rQ   s   @@r(   r   r   "  s     HHHHs"E!C'F !I-8<G("\1H<S@H(94x?%GOX%+M)C/NL Lr*   r   c                   s0   a  ] tR tRt o RR ltR tRtV tR# )ExtremeFinderCyclei6  Nc                sV    WuV n         V n        W4uV n        V n        WPn        W`n        R# )a  
This subclass handles the case where one or both coordinates should be
taken modulo 360, or be restricted to not exceed a specific range.

Parameters
----------
nx, ny : int
    The number of samples in each direction.

lon_cycle, lat_cycle : 360 or None
    If not None, values in the corresponding direction are taken modulo
    *lon_cycle* or *lat_cycle*; in theory this can be any number but
    the implementation actually assumes that it is 360 (if not None);
    other values give nonsensical results.

    This is done by "unwrapping" the transformed grid coordinates so
    that jumps are less than a half-cycle; then normalizing the span to
    no more than a full cycle.

    For example, if values are in the union of the [0, 2] and
    [358, 360] intervals (typically, angles measured modulo 360), the
    values in the second interval are normalized to [-2, 0] instead so
    that the values now cover [-2, 2].  If values are in a range of
    [5, 1000], this gets normalized to [5, 365].

lon_minmax, lat_minmax : (float, float) or None
    If not None, the computed bounding box is clipped to the given
    range in the corresponding direction.
N)nxny	lon_cycle	lat_cycle
lon_minmax
lat_minmax)rF   r   r   r   r   r   r   s   &&&&&&&r(   rH   ZExtremeFinderCycle.__init__9  s+    @ )2&$$r*   c                sH   \         P                  ! \         P                  ! W$V P                  4      \         P                  ! W5V P                  4      4      w  rgV! \         P
                  ! V4      \         P
                  ! V4      4      w  r\         P                  ! R R7      ;_uu_ 4        V P                  e0   \         P                  ! V4      p
VRW,
          R8  ,          ,          pV P                  e0   \         P                  ! V	4      pV	RW,
          R8  ,          ,          p	RRR4       \         P                  ! V4      \         P                  ! V4      r\         P                  ! V	4      \         P                  ! V	4      rV P                  WW4      w  rrV P                  '       d   \        WV P                  ,           4      pV P                  '       d   \        WV P                  ,           4      pV P                  e?   V P                  ^ ,          p\        VV4      pV P                  ^,          p\        VV4      pV P                  e?   V P                  ^ ,          p\        VV4      pV P                  ^,          p\        VV4      pWW3#   + '       g   i     ELt; i)Zignore)ZinvalidNr3   g     f@)r   ZmeshgridZlinspacer   r   ZravelZerrstater   Znanminr   ZnanmaxZ_add_padZminr   Zmaxr   )rF   Ztransform_xyZx1Zy1Zx2Zy2ZxZyZlonZlatZlon0Zlat0Zlon_minZlon_maxZlat_minZlat_maxZmin0Zmax0s   &&&&&&            r(   rW   ZExtremeFinderCycle.__call__^  s   {{KK("++bdgg*FHRXXa[9 [[**~~)yy~t
d233~~)yy~t
d233 + 99S>299S>99S>299S> MM'G= 	+' >>>'T^^#;<G>>>'T^^#;<G??&??1%D$(G??1%D$(G??&??1%D$(G??1%D$(G11A +**s   *A;JJ!	)r   r   r   r   r   r   )r3   NN)ir   )rJ   rK   rL   rM   rH   rW   rN   rO   rP   rR   r(   r   r   6  s     #%J,2 ,2r*   r   )FTr   )Tr   )Znumpyr   r0   Z#mpl_toolkits.axisartist.grid_finderr   r)   r.   r2   r=   r@   rA   rB   rS   rZ   r`   rc   re   rf   rg   r   r   rX   r*   r(   <module>r      s      C44(.%b :$ $E E
2 21{ 1F F
3 32{ 2e< e<PL< L(T2, T2r*   