Files
intellecton/venv/lib/python3.12/site-packages/matplotlib/__pycache__/cbook.cpython-312.pyc
T

1105 lines
96 KiB
Plaintext
Raw Normal View History

Ë
†Rj”8ãó’—dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
m Z ddl Z ddl
Z
ddlZddlZddlZddlZddlZddlZ ddlmZddlZddlmZmZGd„d«Zd„Zd „ZGd
„d «Zd „ZGd
„d«Z Gd„d«Z!Gd„de"«Z#ejHdœd„Z%d„Z&d„Z'd„Z(d„Z)d`d„Z*dad„Z+d„Z,dbd„Z-d„Z.e,fd„Z/Gd „d!«Z0dcd"„Z1ejddfd#„Z3Gd$„d%«Z4Gd&„d'«Z5d(„Z6d)„Z7d*„Z8dd+œd,„Z9ddd-„Z:d.d/d0d1d2œZ;e;jy«D��cic]\}}||“Œ
c}}Z=d3„Z>d4„Z?d5„Z@d6„ZAd7„ZBded8„ZCd9„ZDd:„ZEd;„ZFd<„eDeDeEeFd=œZGd>„ZHd?„ZId@„ZJdA„ZKdfdB„ZLejšdC„«ZNejžePej¢dD«¬E«fdF„ZRdG„ZSdH„ZTdI„ZUdJ„ZVdK„ZWejšdL„«ZXGdM„dNej²j´«Z[dO„Z\dP„Z]dQ„Z^dR„Z_dS„Z`dT„ZadU„ZbdV„ZcdW„ZdejÊdfdX„«ZfdY„ZgdZ„Zhd[„Zid\„Zjd]„Zkd^„Zld_„Zmy#e$r
ddlmZY�ŒëwxYwcc}}w)gz‡
A collection of utility functions and classes. Originally, many
(but not all) were from the Python Cookbook -- hence the name cbook.
éN)ÚPath)ÚVisibleDeprecationWarning)Ú_apiÚ_c_internal_utilscó,—eZdZdZd„Zed„«Zd„Zy)Ú_ExceptionInfoa—
A class to carry exception information around.
This is used to store and later raise exceptions. It's an alternative to
directly storing Exception instances that circumvents traceback-related
issues: caching tracebacks can keep user's objects in local namespaces
alive indefinitely, which can lead to very surprising memory issues for
users and result in incorrect tracebacks.
có —||_||_y©N©Ú_clsÚ_args)ÚselfÚclsÚargss úS/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/cbook.pyÚ__init__z_ExceptionInfo.__init__.s€ØˆŒ ؈�
ócó:—|t|«g|j¢­ŽSr
)Útyper)rÚexcs rÚfrom_exceptionz_ExceptionInfo.from_exception2s€á”4˜“9Ð(˜sŸx™xÒ(Ð(rcó4—|j|jŽSr
r ©rs rÚ to_exceptionz_ExceptionInfo.to_exception6s€Øˆt�y‰y˜$Ÿ*™*Ð%Ð%rN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ classmethodrr©rrrr#s%„ñòðñ)óð)ó&rrcóD—tjjd«xsatjjd«xs@tjjd«xstjjd«}|r|jj «rytjjd«}|rF|j
dk(rdd lm}|j«ry
|j
d k(r|j«ry tjjd
«}|r|j«ry
tjjd«}|r€|jj|jjjh}tj«j«D]$}|sŒ|j |vry|j"}|rŒŒ&~tjjd«}|r|j%«ryt'j(«syy)a/
Return the interactive framework whose event loop is currently running, if
any, or "headless" if no event loop can be started, or None.
Returns
-------
Optional[str]
One of the following values: "qt", "gtk3", "gtk4", "wx", "tk",
"macosx", "headless", ``None``.
zPyQt6.QtWidgetszPySide6.QtWidgetszPyQt5.QtWidgetszPySide2.QtWidgetsÚqtzgi.repository.Gtkér)ÚGLibÚgtk4éÚgtk3ÚwxÚtkinterÚtkzmatplotlib.backends._macosxÚmacosxÚheadlessN)ÚsysÚmodulesÚgetÚ QApplicationÚinstanceÚ
MAJOR_VERSIONÚ
gi.repositoryr$Ú
main_depthÚ
main_levelÚGetAppÚmainloopÚ__code__ÚMiscÚ_current_framesÚvaluesÚf_codeÚf_backÚevent_loop_is_runningrÚdisplay_is_valid)Ú QtWidgetsÚGtkr$r(r)ÚcodesÚframer+s rÚ"_get_running_interactive_frameworkrD:sœ€ô � ‰ �‰Ð)Ó*ò 0Ü �;‰;�?‰?Ð.Ó /ò 0ä �;‰;�?‰?Ð,Ó -ò 0ô �;‰;�?‰?Ð.Ó /ð ñ �Y×+Ñ+×4Ñ4Ô6ØÜ
�+‰+�/‰/Ð-Ó
.€CÙ
Ø × Ñ  Ò !Ý *Ø�‰Ô ØØ × Ñ  Ò ! c§n¡nÔ&6ØÜ �‰�‰˜Ó €BÙ ˆb�i‰iŒkØÜ�k‰k�o‰o˜iÓ(€GÙØ×!Ñ!×*Ñ*¨G¯L©L×,AÑ,A×,JÑ,JÐKˆÜ×(Ñ(Ó*×1Ñ1Ó3ò %ˆEÚØ—<‘< 5Ñ(ÙØŸ ™ �óð %ð
Ü
�[‰[�_‰_Ð:Ó
;€FÙ
�&×.Ñ.Ô0ØÜ × -Ñ -Ô /ØØ rcóH—t«dvr|‚tj«y)N)r,N)rDÚ tracebackÚ print_exc)rs rÚ_exception_printerrHls€Ü)Ó+Ð/AÑA؈ ä×ÑÕrcó(—eZdZdZd„Zd„Zd„Zd„Zy)Ú
_StrongRefzU
Wrapper similar to a weakref, but keeping a strong reference to the object.
có—||_yr
©Ú_obj)rÚobjs rrz_StrongRef.__init__xs €Øˆ� rcó—|jSr
rLrs rÚ__call__z_StrongRef.__call__{s €Ø�y‰yÐrcóX—t|t«xr|j|jk(Sr
)Ú
isinstancerJrM)rÚothers rÚ__eq__z_StrongRef.__eq__~s!€Ü˜%¤Ó,ÒH°·±¸e¿j¹jÑ1HÐHrcó,—t|j«Sr
)ÚhashrMrs rÚ__hash__z_StrongRef.__hash__�s€Ü�D—I‘I‹ÐrN)rrrrrrPrTrWr rrrJrJss„ñòòòIórrJcód— tj||«S#t$rt|«cYSwxYw)zQ
Return a `WeakMethod` wrapping *func* if possible, else a `_StrongRef`.
)ÚweakrefÚ
WeakMethodÚ TypeErrorrJ)ÚfuncÚcallbacks rÚ_weak_or_strong_refr^…s4€ð Ü×!Ñ! $¨Ó1Ð1øÜ ò ܘ$ÓÒð ús ‚˜/®/có.—eZdZdZd„Zd„Zd„Zd„Zd„Zy)Ú _UnhashDicta
A minimal dict-like class that also supports unhashable keys, storing them
in a list of key-value pairs.
This class only implements the interface needed for `CallbackRegistry`, and
tries to minimize the overhead for the hashable case.
có>—i|_g|_|D]
\}}|||<Œ yr
©Ú_dictÚ_pairs)rÚpairsÚkÚvs rrz_UnhashDict.__init__˜s,€ØˆŒ
؈Œ Øò ‰DˆAˆq؈D�ŠGñ rcóî— ||j|<y#t$rYt|j«D]!\}\}}||k(sŒ||f|j|<Yy|jj ||f«YywxYwr
)rcr[Ú enumeraterdÚappend)rÚkeyÚvalueÚirfrgs rÚ __setitem__z_UnhashDict.__setitem__žsv€ð 1Ø#ˆD�J‰J�sŠOøÜò 1Ü& t§{¡{Ó3ò
1‘ �‘6�A�qؘ“8Ø&)¨5 \�D—K‘K ‘NÚð
1ð
— ‘ ×"Ñ" C¨ <Ö0ð
 1ús‚’,A4¿A4ÁA4Á3A4có�— |j|S#t$rYnwxYw|jD]\}}||k(sŒ |cSt|«‚r
)rcr[rdÚKeyError)rrkrfrgs rÚ __getitem__z_UnhashDict.__getitem__©sV€ð Ø—:‘:˜c‘?Ð "øÜò Ù ð úà—K‘Kò ‰DˆAˆqØ�C‹xØ’ð ô�s‹mÐs ‚‘ œcó
— ||jvr|jj|«S |r|dSt |«‚#t$r;t|j«D] \}\}}||k(sŒ|j|=|ccYSYŒUwxYw©Nr)rcÚpopr[rirdrp)rrkrrmrfrgs rrtz_UnhashDict.pop³s‹€ð Ø�d—j‘jÑ Ø—z‘z—~‘~ cÓ*Ð*ð!ñ ؘ‘7ˆNÜ�s‹mÐøôò Ü& t§{¡{Ó3ò
‘ �‘6�A�qؘ“8ØŸ ™  A˜Ø”Hò
ð ús‚(>¾,BÁ+BÁ>BÂBc#óhK—|jEd{–—†|jD] \}}|–—Œ y7Œ­wr
rb©rrfrgs rÚ__iter__z_UnhashDict.__iter__Às4èø€Ø—:‘:×ÐØ—K‘Kò ‰DˆAˆqØ‹Gñ ð ús ‚2’0“2N) rrrrrrnrqrtrwr rrr`r`�s „ñòò 1òò órr`cóŽ—eZdZdZefddœd„Zd„Zd„Zd„Zd„Z e
jd œd
„Z d „Z
d „Zej dd
œd„«Zy)ÚCallbackRegistryaö
Handle registering, processing, blocking, and disconnecting
for a set of signals and callbacks:
>>> def oneat(x):
... print('eat', x)
>>> def ondrink(x):
... print('drink', x)
>>> from matplotlib.cbook import CallbackRegistry
>>> callbacks = CallbackRegistry()
>>> id_eat = callbacks.connect('eat', oneat)
>>> id_drink = callbacks.connect('drink', ondrink)
>>> callbacks.process('drink', 123)
drink 123
>>> callbacks.process('eat', 456)
eat 456
>>> callbacks.process('be merry', 456) # nothing will be called
>>> callbacks.disconnect(id_eat)
>>> callbacks.process('eat', 456) # nothing will be called
>>> with callbacks.blocked(signal='drink'):
... callbacks.process('drink', 123) # nothing will be called
>>> callbacks.process('drink', 123)
drink 123
In practice, one should always disconnect all callbacks when they are
no longer needed to avoid dangling references (and thus memory leaks).
However, real code in Matplotlib rarely does so, and due to its design,
it is rather difficult to place this kind of code. To get around this,
and prevent this class of memory leaks, we instead store weak references
to bound methods only, so when the destination object needs to die, the
CallbackRegistry won't keep it alive.
Parameters
----------
exception_handler : callable, optional
If not None, *exception_handler* must be a function that takes an
`Exception` as single parameter. It gets called with any `Exception`
raised by the callbacks during `CallbackRegistry.process`, and may
either re-raise the exception or handle it in another manner.
The default handler prints the exception (with `traceback.print_exc`) if
an interactive event loop is running; it re-raises the exception if no
interactive event loop is running.
signals : list, optional
If not None, *signals* is a list of signals that this registry handles:
attempting to `process` or to `connect` to a signal not in the list
throws a `ValueError`. The default, None, does not restrict the
handled signals.
N)Úsignalscó¸—|€dn
t|«|_||_i|_t j
«|_tg«|_t«|_
yr
) ÚlistÚ_signalsÚexception_handlerÚ callbacksÚ itertoolsÚcountÚ_cid_genr`Ú
_func_cid_mapÚsetÚ
_pickled_cids)rr~rzs rrzCallbackRegistry.__init__sF€Ø ' ™´T¸'³]ˆŒ
Ø!2ˆÔ؈ŒÜ!Ÿ™Ó)ˆŒ
Ü(¨›_ˆÔä ›UˆÕrcó4—it|«¥|jj«D����cic]=\}}||j«D��cic]\}}||jvr||«“Œc}}“Œ?c}}}}dt |j
«dœ¥Scc}}wcc}}}}w)N)rrƒr‚)ÚvarsrÚitemsr…Únextr‚)rÚsÚdÚcidÚproxys rÚ __getstate__zCallbackRegistry.__getstate__ s�€ð

Ü�4‹jð

ð '+§n¡n×&:Ñ&:Ó&<÷>ñ>á"˜a ð¸Q¿W¹W»Y÷<©z¨s°EØ!$¨×(:Ñ(:Ñ!:ð"¡5£7™ló<ñ<õ>ð"ܘTŸ]™]Ó+ò

ð
ùó<ùõ>s¬B Á B Á(B Â B có
—|jd«}t|«j|«|jj «D����cic]R\}}||j «D��cic]0\}}|t |t
j|j|««“Œ2c}}“ŒTc}}}}|_td„|jj «D««|_
tj|«|_
ycc}}wcc}}}}w)Nr‚c3ó^K—|]%\}}|j«D]
\}}||f|f–—ŒŒ'y­wr
)rˆ)Ú.0rŠr‹rŒr�s rú <genexpr>z0CallbackRegistry.__setstate__.<locals>.<genexpr> sEèø€ò)Lá��1ÀÇÁÃò)Lá3=°3¸ð�ˆZ˜Ô ð)LØ ñ)Lùs‚+-)rtr‡Úupdaterrˆr^Ú functoolsÚpartialÚ
_remove_proxyr`rƒr€r�r‚)rÚstateÚ cid_countrŠr‹rŒr\s rÚ __setstate__zCallbackRegistry.__setstate__s䀨—I‘I˜jÓ)ˆ Ü ˆT‹
×ј%Ô ðŸ™×,Ñ,Ó.÷0ñ0ñ��1ð
Ø!"§¡£÷,Ù�C˜ðÔ(¨¬y×/@Ñ/@À×ASÑASÐUVÓ/WÓXÑXó,ñ
,õ0ˆŒô)ñ)LàŸ™×,Ñ,Ó.ô)LóLˆÔô"Ÿ™¨ Ó2ˆ�
ùó
,ùõ0sÁ C=
Á'5C7ÂC=
Ã7C=
có€—|j�!tj|j|¬«t|t j
|j |««} |j||fS#t$rJt|j«x}|j||f<||jj|i«|<|cYSwxYw)z?Register *func* to be called when signal *signal* is generated.©Úsignal)
r}rÚ
check_in_listr^r”r•r–rƒrpr‰r‚rÚ
setdefault)rrœr\r�rŒs rÚconnectzCallbackRegistry.connect%s«€à �=‰=Ð $Ü × Ñ ˜tŸ}™}°VÕ <Ü# D¬)×*;Ñ*;¸D×<NÑ<NÐPVÓ*WÓXˆð Ø×%Ñ% f¨e mÑ4Ð 4øÜò Ü6:¸4¿=¹=Ó6IÐ IˆC�$×$Ñ$ V¨U ]Ñ3Ø9>ˆD�N‰N× %Ñ % f¨bÓ 1°#Ñ 6ØŠJð úsÁA*Á*AB=Â<B=có`—|j||«}|jj|«|S)z{
Like `.connect`, but the callback is kept when pickling/unpickling.
Currently internal-use only.
)rŸr…Úadd)rrœr\rŒs rÚ_connect_picklablez#CallbackRegistry._connect_picklable1s-€ð �l‰l˜6 4Ó(ˆØ ×Ñ×јsÔ#؈
r)Ú_is_finalizingcó—|«ry|jj||fd«}|�,|j||=|jj |«nyt |j|«dk(r|j|=yyrs)rƒrtrr…ÚdiscardÚlen)rrœr�r£rŒs rr–zCallbackRegistry._remove_proxy=s{€Ù Ô à Ø× Ñ ×$Ñ$ f¨e _°dÓ;ˆØ ˆ?Ø—‘˜vÑ& sÐ+Ø × Ñ × &Ñ & sÕ +à Ü ˆt�~‰~˜fÑ%Ó &¨!Ò +Ø—‘˜vÑ&ð ,rcój—|jj|«|jD]\}}|j||f|k(sŒny|j|||k(sJ‚|j||=|jj ||f«t |j|«dk(r|j|=yy)z‹
Disconnect the callback registered with callback id *cid*.
No error is raised if such a callback does not exist.
Nr)r…r¥rƒrrtr¦)rrŒrœr�s rÚ
disconnectzCallbackRegistry.disconnectJs¼€ð
×Ñ×"Ñ" 3Ô'Ø!×/Ñ/ò ‰MˆF�EØ×!Ñ! &¨% -Ñ0°CÓ7Ùð ð
Ø�~‰~˜fÑ% cÑ*¨eÒ3Ð3Ð3Ø �N‰N˜6Ñ " 3Ð 'Ø ×Ñ×Ñ ¨˜Ô/Ü ˆt�~‰~˜fÑ%Ó &¨!Ò +Ø—‘˜vÑ&ð ,rcó^—|j�!tj|j|¬«t|jj |i«j
««D]}|«}|€Œ
||i|¤ŽŒy#t$r)}|j�|j|«n‚Yd}~ŒFd}~wwxYw)z¢
Process signal *s*.
All of the functions registered to receive callbacks on *s* will be
called with ``*args`` and ``**kwargs``.
Nr›) r}rr�r|rr/r;Ú Exceptionr~)rrŠrÚkwargsÚrefr\rs rÚprocesszCallbackRegistry.process\s£€ð �=‰=Ð $Ü × Ñ ˜tŸ}™}°QÕ 7ܘŸ™×*Ñ*¨1¨bÓ1×8Ñ8Ó:Ó;ò ˆCÙ“5ˆDØÑðÙ˜$Ð) &Ó)ñ øô!òØ×-Ñ-Ð9Ø×.Ñ.¨sÕ3àô4ûðúsÁ/A:Á: B,ÂB'Â'B,r›c#ó°K—|j} |€i|_n|D�cic]}||k7sŒ |||“Œc}|_d–—||_ycc}w#||_wxYw­w)aV
Block callback signals from being processed.
A context manager to temporarily block/disable callback signals
from being processed by the registered listeners.
Parameters
----------
signal : str, optional
The callback signal to block. The default is to block all signals.
N)r)rrœÚorigrfs rÚblockedzCallbackRegistry.blockedrs^èø€ð�~‰~ˆð "؈~à!#�•ð7;Ö!J°¸aÀ6»k ! T¨!¡W¡*Ò!J�”Û à!ˆD�Nùò"Køð"ˆD�Nüs0‚
A�A
ž
A©A± A
½AÁA
Á
AÁA)rrrrrHrrŽr™rŸr¢r-Ú
is_finalizingr–r¨r­Ú
contextlibÚcontextmanagerr°r rrryryÆse„ñ6ðx*<ð#Èô#ò 
ò
3ò
òð>A×=NÑ=Nô 'ò'ò$ð,×ÑØ $ó"óñ"rrycó—eZdZdZdd„Zd„Zy)Ú silent_lista
A list with a short ``repr()``.
This is meant to be used for a homogeneous list of artists, so that they
don't cause long, meaningless output.
Instead of ::
[<matplotlib.lines.Line2D object at 0x7f5749fed3c8>,
<matplotlib.lines.Line2D object at 0x7f5749fed4e0>,
<matplotlib.lines.Line2D object at 0x7f5758016550>]
one will get ::
<a list of 3 Line2D objects>
If ``self.type`` is None, the type name is obtained from the first item in
the list (if any).
Ncó:—||_|�|j|«yyr
)rÚextend)rrÚseqs rrzsilent_list.__init__¡s€ØˆŒ Ø ˆ?Ø �K‰K˜Õ ð rcó¼—|j€t|«dk7rB|j� |jnt|d«j}dt|«›d|›d�Sy)Nrz <a list of ú z objects>z<an empty list>)rr¦r)rÚtps rÚ__repr__zsilent_list.__repr__¦sT€Ø �9‰9Ð ¤C¨£I°¢NØ"Ÿi™iÐ3�—’¼¸dÀ1¹g»×9OÑ9OˆBØ ¤ T£  ¨1¨R¨D° Ð:Ð :à$rr
)rrrrrr¼r rrrµrµŒs„ñó(ó
%rrµ)Ú warning_clscó€—|}|D]6}|j|d«}|€Œ|€|}Œtjd|›d�|«Œ8|S)Nú"z"" keyword argument will be ignored)rtrÚ
warn_external)Ú local_varr«r½ÚkeysÚoutrkÚ kwarg_vals rÚ_local_over_kwdictrÅ®s\€ð €CØò0ˆØ—J‘J˜s DÓ)ˆ Ø Ñ Øˆ{Ø‘ä×"Ñ" Q s eÐ+MÐ#NØ#.õ0ð
0ð €JrcóŽ—t|«dk\r6|d|dcxk(rdk(r%n|S|dd}dD]\}}|j||«}Œ|S)zi
Remove latex formatting from mathtext.
Only handles fully math and fully non-math strings.
éréÿÿÿÿú$é) )z\timesÚx)z \mathdefaultÚ)z\rmrÌ)z\calrÌ)z\ttrÌ)z\itrÌ)ú\rÌ)ú{rÌ)ú}rÌ)r¦Úreplace)rŠÚtexÚplains rÚ
strip_mathrÓ½se€ô  ˆ1ƒv�‚{�q˜‘t˜q ™uÔ+¨Ô+ð
€Hð
ˆa�ˆGˆð

ò &‰JˆC�ð— ‘ ˜#˜uÓ%‰Að &ð
€Hrcó2—d} |jd|«}|jd|«}|dkr|dkr|n|d|}|j«Sd|cxkr|krnn|d|j«S|jd|dz«}|dkrtd|›d�«‚|dz}Œ•)z+Strip everything from the first unquoted #.rr¿ú#NrÊzMissing closing quote in: zM. If you need a double-quote inside a string, use escaping: e.g. "the " char")ÚfindÚstripÚ
ValueError)rŠÚposÚ quote_posÚhash_posÚwithout_commentÚclosing_quote_poss rÚ_strip_commentrÞÔsÅ€à
€CØ
Ø—F‘F˜3 Ó$ˆ Ø—6‘6˜#˜sÓ#ˆØ �qŠ=Ø#+¨a¢<™a°Q°y¸°\ˆOØ"×(Ñ(Ó*Ð *Ø
�(Ô
&˜YÕ
&Ø�Y�h�<×%Ñ%Ó'Ð 'à !§¡ s¨I¸©MÓ :Ð Ø  1Ò$Ü Ø0°°ð6NðNóOðOð$ aÑ'ˆCð rcó.—tt|dd««S)zDReturn whether *obj* looks like a file object with a *write* method.ÚwriteN)ÚcallableÚgetattr©rNs rÚis_writable_file_likeräès€ä ”G˜C ¨$Ó/Ó 0Ð0rcóF— |jd«y#t$rYywxYw)zf
Return whether the given writable file-like object requires Unicode to be
written to it.
rFT)ràr[©rËs rÚfile_requires_unicoderçís+€ð
Ø �‰�Œ ðøô òÙðús ‚” Ÿ FcóŠ—t|tj«rtj|«}t|t«ra|j d«rt
j||«}n6|j d«rddl}|j||«}nt|||¬«}d}nt|d«r|}d}n td «‚|r||fS|S)
a^
Convert a path to an open file handle or pass-through a file-like object.
Consider using `open_file_cm` instead, as it allows one to properly close
newly created file objects more easily.
Parameters
----------
fname : str or path-like or file-like
If `str` or `os.PathLike`, the file is opened using the flags specified
by *flag* and *encoding*. If a file-like object, it is passed through.
flag : str, default: 'r'
Passed as the *mode* argument to `open` when *fname* is `str` or
`os.PathLike`; ignored if *fname* is file-like.
return_opened : bool, default: False
If True, return both the file object and a boolean indicating whether
this was a new file (that the caller needs to close). If False, return
only the new file.
encoding : str or None, default: None
Passed as the *mode* argument to `open` when *fname* is `str` or
`os.PathLike`; ignored if *fname* is file-like.
Returns
-------
fh : file-like
opened : bool
*opened* is only returned if *return_opened* is True.
ú.gzz.bz2rN)ÚencodingTÚseekFz'fname must be a PathLike or file handle) rRÚosÚPathLikeÚfspathÚstrÚendswithÚgzipÚopenÚbz2ÚBZ2FileÚhasattrrØ)ÚfnameÚflagÚ
return_openedrêÚfhróÚopeneds rÚ
to_filehandlerûús¬€ô:�%œŸ™Ô%Ü— ‘ ˜%Ó ˆÜ�%œÔØ �>‰>˜%Ô Ü—‘˜5 $Ó'‰BØ
�^‰^˜FÔ
#ó
Ø—‘˜U DÓ)‰Bä�e˜T¨HÔ5ˆBØ‰Ü �˜Ô Ø
ˆØ‰äÐBÓCÐCÙØ�6ˆzÐØ
€IrcóV—t||d|«\}}|r|Stj|«S)z8Pass through file objects and context-manage path-likes.T)rûr²Ú nullcontext)Ú path_or_fileÚmoderêrùrús rÚ open_file_cmr.s.€ä˜|¨T°4¸ÓB�J€BˆÙˆ2Ð7œZ×3Ñ3°BÓ7Ð7rcóR—t|t«xstj|« S)z;Return whether the given object is a scalar or string like.)rRrïÚnpÚiterable©Úvals rÚis_scalar_or_stringr4s €ä �cœ3Ó Ò 7¤r§{¡{°3Ó'7Ð#7Ð7rcó—td|«}|rs|jj«}|dk(rtj|«S|dvrt j |«S|dvr|j d«S|j d«St|«S)aæ
Return a sample data file. *fname* is a path relative to the
:file:`mpl-data/sample_data` directory. If *asfileobj* is `True`
return a file object, otherwise just a file path.
Sample data files are stored in the 'mpl-data/sample_data' directory within
the Matplotlib package.
If the filename ends in .gz, the file is implicitly ungzipped. If the
filename ends with .npy or .npz, and *asfileobj* is `True`, the file is
loaded with `numpy.load`.
Ú sample_dataré)z.npyz.npz)z.csvz.xrcz.txtÚrÚrb)Ú_get_data_pathÚsuffixÚlowerrñròrÚloadrï)röÚ asfileobjÚpathr s rÚget_sample_datar9s€€ô ˜-¨Ó /€DÙØ—‘×"Ñ"Ó$ˆØ �UŠ?Ü—9‘9˜T“?Ð "Ø
Ð'Ñ
'Ü—7‘7˜4“=Ð Ø
Ð/Ñ
/Ø—9‘9˜S“>Ð !à—9‘9˜T“?Ð "ä�4‹yÐrcó>—ttj«g|¢­ŽS)zŒ
Return the `pathlib.Path` to a resource file provided by Matplotlib.
``*args`` specify a path relative to the base data path.
)rÚ
matplotlibÚ
get_data_path)rs rr r Us€ô ”
×(Ñ(Ó*Ð 2¨TÒ 2Ð2rc#ódK—|D]%}||«s|€|–—Œt||«Ed{–—†Œ'y7Œ­w)aÙ
Return a generator of flattened nested containers.
For example:
>>> from matplotlib.cbook import flatten
>>> l = (('John', ['Hunter']), (1, 23), [[([42, (5, 23)], )]])
>>> print(list(flatten(l)))
['John', 'Hunter', 1, 23, 42, 5, 23]
By: Composite of Holger Krekel and Luther Blissett
From: https://code.activestate.com/recipes/121294-simple-generator-for-flattening-nested-containers/
and Recipe 1.12 in cookbook
N)Úflatten)r¸ÚscalarpÚitems rrr^s<èø€ðò.ˆÙ �4Œ=˜D˜LØ‹Jä˜t WÓ-× -Ñ -ñ .ð
.ús ‚$0¦.§0cóF—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z
d „Z d
„Z y ) Ú_Stackzb
Stack of elements with a movable cursor.
Mimics home/back/forward in a web browser.
có —d|_g|_y)NrÈ©Ú_posÚ _elementsrs rrz_Stack.__init__{s€ØˆŒ ؈�rcó —d|_g|_y)zEmpty the stack.rÈNrrs rÚclearz _Stack.clears€àˆŒ ؈�rcóP—|jr|j|jSdS)z$Return the current element, or None.N)rrrs rrPz_Stack.__call__„s €à,0¯NªNˆt�~‰~˜dŸi™iÑ(ÐDÀÐDrcó,—t|j«Sr
)r¦rrs rÚ__len__z_Stack.__len__ˆs€Ü�4—>‘>Ó"Ð"rcó —|j|Sr
)r)rÚinds rrqz_Stack.__getitem__‹s€Ø�~‰~˜cÑ"Ð"rcóx—t|jdzt|j«dz
«|_|«S)z9Move the position forward and return the current element.rÊ)Úminrr¦rrs rÚforwardz_Stack.forwardŽs-€ä˜Ÿ ™  A™
¤s¨4¯>©>Ó':¸QÑ'>Ó?ˆŒ Ù‹vˆ
rcóL—t|jdz
d«|_|«S)z6Move the position back and return the current element.rÊr)Úmaxrrs rÚbackz _Stack.back“s€ä˜Ÿ ™  A™
 qÓ)ˆŒ Ù‹vˆ
rcóz—|g|j|jdzdt|j«dz
|_|S)zx
Push *o* to the stack after the current position, and return *o*.
Discard all later elements.
rÊN)rrr¦)rÚos rÚpushz _Stack.push˜s8€ð +,¨ˆ�‰�t—y‘y 1‘}�~Ð&ܘŸ™Ó'¨!Ñ+ˆŒ ؈rcóZ—|jr|j|jd«SdS)zk
Push the first element onto the top of the stack.
The first element is returned.
rN)rr.rs rÚhomez _Stack.home¢s'€ð 04¯~ª~ˆt�y‰y˜Ÿ™¨Ñ*Ó+ÐGÀ4ÐGrN)
rrrrrr rPr#rqr(r+r.r0r rrrrts6„ñò òò
Eò#ò#òò
ò
óHrrcóf—tj|d|¬«}|jjs:|j |¬«j |jj
d««} tjjtj|«|d¬«}|S#t$r|cYSwxYw)NT)ÚsubokÚcopy)ÚinplaceÚNF)r3) rÚarrayÚdtypeÚisnativeÚbyteswapÚviewÚ newbyteorderÚmaÚ masked_whereÚisfiniter[)rËr3Úxms rÚsafe_masked_invalidr@«s•€Ü
�‰�˜$ TÔ*€AØ �7‰7× Ò ð
�J‰J˜tˆJÓ $× )Ñ )¨!¯'©'×*>Ñ*>¸sÓ*CÓ DˆðÜ
�U‰U×
Ñ
¤"§+¡+¨a£.Ð 1°1¸5Ð
Ó
Aˆð €Iøô òØŠðúsÁ*6B"Â" B0Â/B0c󄇇‡‡‡‡—ddlŠˆfd„Šˆˆˆˆˆˆfd„ЉD]"}‰jd|›d�«‰||ig«Œ$y)a°
Print loops of cyclic references in the given *objects*.
It is often useful to pass in ``gc.garbage`` to find the cycles that are
preventing some objects from being garbage collected.
Parameters
----------
objects
A list of objects to find cycles in.
outstream
The stream for output.
show_progress : bool
If True, print the number of objects reached as they are found.
rNcór•—t|«D�]\}}||dzt|«z}‰jdt|«z«t |t
«rN|j
«D]:\}}||ur‰jd|›d�«n�||usŒ&‰jd|›�«nrnpt |t«r$‰jd|j|«z«n<t |t«r‰jd«n‰jt|««‰jd«�Œ‰jd «y)
NrÊz %s -- ú[ú]z[key] = z[%d]z ( tuple )z ->
ú
) rir¦ràrrRÚdictrˆr|ÚindexÚtupleÚrepr)rrmÚstepr‰rkrÚ outstreams €rÚ
print_pathz print_cycles.<locals>.print_pathËs
ø€Ü  “ó %‰GˆAˆtà˜˜Q™¤# d£)Ñ+Ñ,ˆDà �O‰O˜K¬$¨t«*Ñ4Ô 5ܘ$¤Ô%Ø $§
¡
£ ò‘H�C˜Ø˜d‘{Ø!Ÿ™¨!¨C¨7°!¨ Ô5ÙØ˜d’{Ø!Ÿ™¨(°3°'Ð(:Ô;Ùñ
ô˜D¤$Ô'Ø—‘ ¨¯©°DÓ)9Ñ 9Õ:ܘD¤%Ô(Ø—‘  Õ,à—‘¤ T£
Ô+Ø �O‰O˜GÖ $ð' %ð( �‰˜Õrcó"•—‰ r‰jdt|«z«d|t|«<‰j|«}|D]K}||ur ‰ |«Œ|‰ust |t
j «rŒ/t|«|vsŒ=‰
|||||gz«ŒMy)Nz%d
)ràr¦ÚidÚ
get_referentsrRÚtypesÚ FrameType) rNÚstartÚallÚ current_pathÚ referentsÚreferentÚgcÚobjectsrKrLÚrecurseÚ
show_progresss €€€€€€rrYzprint_cycles.<locals>.recurseâs˜ø€Ù Ø �O‰O˜F¤S¨£XÑ-Ô .àˆŒBˆs‹G‰ à×$Ñ$ SÓ)ˆ Ø!ò DˆHð˜5Ñ Ù˜<Õ(ð
˜WÑ$¬
°8¼U¿_¹_Ô(MØô�H“ SÒ(Ù˜ %¨¨l¸c¸UÑ.BÕCñ Drz Examining: rE)rWrà)rXrKrZrNrWrLrYs``` @@@rÚ print_cyclesr[¹sMý€ó ô÷.DñDð.ò"ˆØ�‰˜+ c W¨BÐ/Ô0Ù��S˜"˜bÕ!ñ"rcóH—eZdZdZd d„Zd„Zd„Zd„Zd„Zd„Z d„Z
d „Z d
„Z y )
ÚGroupera#
A disjoint-set data structure.
Objects can be joined using :meth:`join`, tested for connectedness
using :meth:`joined`, and all disjoint sets can be retrieved by
using the object as an iterator.
The objects being joined must be hashable and weak-referenceable.
Examples
--------
>>> from matplotlib.cbook import Grouper
>>> class Foo:
... def __init__(self, s):
... self.s = s
... def __repr__(self):
... return self.s
...
>>> a, b, c, d, e, f = [Foo(x) for x in 'abcdef']
>>> grp = Grouper()
>>> grp.join(a, b)
>>> grp.join(b, c)
>>> grp.join(d, e)
>>> list(grp)
[[a, b, c], [d, e]]
>>> grp.joined(a, b)
True
>>> grp.joined(a, c)
True
>>> grp.joined(a, d)
False
c ó^—tj|D�cic]}|tj|g«“Œc}«|_tj«|_|D]3}||jvsŒt |j«|j|<Œ5t |j«|_ycc}wr
)rYÚWeakKeyDictionaryÚWeakSetÚ_mappingÚ _orderingr¦Ú _next_order)rÚinitrËs rrzGrouper.__init__ sŒ€Ü×1Ñ1Ø.2Ö 3¨ˆQ”—‘  Ó$Ñ
$Ò 3ó5ˆŒ
ä ×2Ñ2Ó4ˆŒØò 8ˆAؘŸ™Ò&Ü$'¨¯©Ó$7�—‘˜qÒ!ð 8ô˜tŸ~™~Ó.ˆÕùò
4s”B*c ó´—it|«¥|jj«D��cic]\}}|t|«“Œc}}i|j¥dœ¥Scc}}w)N)rarb)r‡rarˆr„rbrvs rrŽzGrouper.__getstate__)sX€ð
Ü�4‹jð
ð04¯}©}×/BÑ/BÓ/D×E¡t q¨!˜œC ›F™ÓEØ+˜DŸN™NÐ+ò 
ð
ùóFsªAc
ó>—t|«j|«tj|jj «D��cic]\}}|tj |«“Œc}}«|_tj|j«|_ycc}}wr
)r‡r“rYr_rarˆr`rb)rr—rfrgs rr™zGrouper.__setstate__1sp€Ü ˆT‹
×ј%Ô ä×1Ñ1Ø/3¯}©}×/BÑ/BÓ/D× E¡t q¨!ˆQ”—‘ Ó"Ñ
"Ó EóGˆŒ
ä ×2Ñ2°4·>±>ÓBˆ�ùó
FsÁ B
có—||jvSr
)ra©rrs rÚ __contains__zGrouper.__contains__8s€Ø�t—}‘}Ð$Ð$rcó—|j} ||}|D]E} ||}||usŒt
|«t
|«kDr||}}|j|«|D]}|||<Œ ŒGy#t$rLtj|g«x}||<|j|j
|<|xjdz
c_YŒŸwxYw#t$rLtj|g«x}||<|j|j
|<|xjdz
c_YΓwxYw)zY
Join given arguments into the same set. Accepts one or more arguments.
rÊN)rarprYr`rcrbr¦r“)rÚarÚmappingÚset_aÚargÚset_bÚelems rÚjoinz Grouper.join;s€ð—-‘-ˆð "ؘA‘JˆEð
ò *ˆCð
&Ø ™ �ð
˜EÒ!Ü�u“:¤ E£
Ò*Ø#(¨%˜5�EØ— ‘ ˜UÔ#Ø!ò*�DØ$)�G˜D’Mñ*ñ *øô ò "Ü!(§¡°!°Ó!5Ð 5ˆE�G˜A‘JØ $× 0Ñ 0ˆD�N‰N˜1Ñ Ø × Ò  Ñ !× ð "ûôò
&Ü'.§¡¸°uÓ'=Ð=�˜ ™ Ø&*×&6Ñ&6�—‘˜sÑ#Ø× Ò  AÑ%× ð
&ús$ŽA™B6ÁAB3Â2B3Â6AD Ä
D có€—|jj|t««|jj|«uS)z7Return whether *a* and *b* are members of the same set.)rar/Úobject©rrkÚbs rÚjoinedzGrouper.joinedTs/€à—
‘
×!Ñ! !¤V£XÓ.°$·-±-×2CÑ2CÀAÓ2FÐFÐGrcó”—|jj||h«j|«|jj|d«y)z>Remove *a* from the grouper, doing nothing if it is not there.N)rartÚremoverb©rrks rrxzGrouper.removeXs7€à �
‰
×ј!˜a˜SÓ!×(Ñ(¨Ô+Ø �‰×ј1˜dÕ#rc#óèK—|jj«D�cic]}t|«|“Œ}}|j«D]%}t||jj
¬«–—Œ'ycc}w­w)z‰
Iterate over each of the disjoint sets as a list.
The iterator is invalid if interleaved with calls to join().
©rkN)rar;rNÚsortedrbrq)rÚgroupÚ
unique_groupss rrwzGrouper.__iter__]shèø€ð 8<·}±}×7KÑ7KÓ7MÖN¨eœ˜E› EÑ)ÐNˆ
ÐNØ"×)Ñ)Ó+ò @ˆEܘ D§N¡N×$>Ñ$>Ô?Ó ?ñ @ùòOùs‚A2ŸA-²AA2có~—|jj||g«}t||jj¬«S)z:Return all of the items joined with *a*, including itself.r{)rar/r|rb)rrkÚsiblingss rÚ get_siblingszGrouper.get_siblingsgs1€à—=‘=×$Ñ$ Q¨¨Ó,ˆÜ�h D§N¡N×$6Ñ$6Ô7Ð7rN)r )
rrrrrrŽr™rirqrvrxrwr�r rrr]r]þs8„ñóB/ò
òCò%ò*ò2Hò$ò
@ó8rr]có.—eZdZdZd„Zd„Zd„Zd„Zd„Zy)Ú GrouperViewz!Immutable view over a `.Grouper`.có—||_yr
©Ú_grouper)rÚgroupers rrzGrouperView.__init__ps€° ¥rcó—||jvSr
r…rhs rrizGrouperView.__contains__qs€¨°·±Ð)>Ð">rcó,—t|j«Sr
)Úiterr†rs rrwzGrouperView.__iter__rs€œt D§M¡MÓ2Ð2rcó:—|jj||«S)zI
Return whether *a* and *b* are members of the same set.
)r†rvrts rrvzGrouperView.joinedts€ð�}‰}×#Ñ# A qÓ)Ð)rcó8—|jj|«S)zL
Return all of the items joined with *a*, including itself.
)r†r�rys rr�zGrouperView.get_siblingszs€ð�}‰}×)Ñ)¨!Ó,Ð,rN) rrrrrrirwrvr�r rrrƒrƒms„Ù+â8Ú>Ú2ò*ó -rrƒc
óª—|jt|«df«}tjt|««|z}tjt|«dz
|zdz«}tj|j
D�cgc]}tj |||«‘Œc}«jt|«f|jddz«Scc}w)a}
Resample an array with ``steps - 1`` points between original point pairs.
Along each column of *a*, ``(steps - 1)`` points are introduced between
each original values; the values are linearly interpolated.
Parameters
----------
a : array, shape (n, ...)
steps : int
Returns
-------
array
shape ``((n - 1) * steps + 1, ...)``
rÈrÊN)Úreshaper¦rÚarangeÚ column_stackÚTÚinterpÚshape)rkÚstepsÚfpsÚxprËÚfps rÚsimple_linear_interpolationr˜�s €ð" �)‰)”S˜“V˜R�LÓ
!€CÜ �‰”3�q“6Ó ˜UÑ "€BÜ
� ‰ ”3�q“6˜A‘: Ñ&¨Ñ*Ó+€AÜ �O‰O¸C¿E¹EÖB°bœRŸY™Y q¨"¨bÕ1ÒBÓ Cß
‰W”c˜!“f�Y §¡¨¨ Ñ,Ó
-ð/ùÒBsÂCcó"—t|«syt|d«r td«‚t|d«}g}dgt|«z}t|«D]¡\}}t |t
«s{t
j|«rft|«|k(rXd||<t |t jj«r|jdkDr td«‚t
j|«}|j|«Œ£g}t|«D]¾\}}||sŒ |jdkDrŒt |t jj«r<|jt jj|««|j}n|} t
j|«}t |t j «r|j|«ŒÀt|«rat j$j'|«}|j)«d} t| «|kr!t|«D]\}}||sŒ || ||<Œt|«D]C\}}||sŒ t |t jj«sŒ1|j+«||<ŒE|S#t"$rY�ŒŒwxYw)ak
Find all masked and/or non-finite points in a set of arguments,
and return the arguments with only the unmasked points remaining.
Arguments can be in any of 5 categories:
1) 1-D masked arrays
2) 1-D ndarrays
3) ndarrays with more than one dimension
4) other non-string iterables
5) anything else
The first argument must be in one of the first four categories;
any argument with a length differing from that of the first
argument (and hence anything in category 5) then will be
passed through unchanged.
Masks are obtained from all arguments of the correct length
in categories 1, 2, and 4; a point is bad if masked in a masked
array or if it is a nan or inf. No attempt is made to
extract a mask from categories 2, 3, and 4 if `numpy.isfinite`
does not yield a Boolean array.
All input arguments that are not passed unchanged are returned
as ndarrays after removing the points or rows corresponding to
masks in any of the arguments.
A vastly simpler version of this function was originally
written as a helper for Axes.scatter().
r rú!First argument must be a sequenceFTrÊúMasked arrays must be 1-D)r¦rrØrirRrïrrr<Ú MaskedArrayÚndimÚasarrayrjÚ getmaskarrayÚdatar>ÚndarrayrªÚ logical_andÚreduceÚnonzeroÚfilled)
rÚnrecsÚmargsÚseqlistrmrËÚmasksÚxdÚmaskÚigoods
rÚdelete_masked_pointsr­™s.€ô@ ˆtŒ9ØÜ˜4 ™7Ô#ÜÐ<Ó=Ð=Ü ��Q‘‹L€EØ €E؈gœ˜D› Ñ!€Gܘ$“ò‰ˆˆ1ܘ!œSÔ!¤b§k¡k°!¤n¼¸Q»À5ºØˆG�A‰Jܘ!œRŸU™U×.Ñ.Ô/Ø—6‘6˜A’:Ü$Ð%@ÓAÐAä—J‘J˜q“M�Ø
� ‰ �Q�ðð
€Eܘ%Ó ò‰ˆˆ1Ø �1‹:Ø�v‰v˜ŠzØÜ˜!œRŸU™U×.Ñ.Ô/Ø— ‘ œbŸe™e×0Ñ0°Ó3Ð3Ô4Ø—V‘V‘à�ð
Ü—{‘{ 2“�ܘd¤B§J¡JÔ/Ø—L‘L Ô&øðô ˆ5„zÜ�~‰~×$Ñ$ UÓ+ˆØ— ‘ “˜qÑ!ˆÜ ˆu‹:˜Ò Ü! %Ó(ò
(‘��1ؘ1“:Ø  ™x�E˜!’Hð
(ô˜%Ó ò"‰ˆˆ1Ø �1‹:œ* Q¬¯©×(9Ñ(9Õ:Ø—x‘x“zˆE�!ŠHð"ð €Løôò
Úð
úsÆAJÊ JÊ
Jcóä—t|«syt|d«r td«‚t|d«}g}dgt|«z}g}t|«D�]\}}t|«st|«|k7r|j |«Œ2t |t jj«r|jdkDr td«‚ t
j|«}|jdk(r]t|«}d||<t jj|«r.|j t jj|««|j |«�Œt|«r\t j j#|«}t|«D]/\}}||sŒ t jj%||¬ «||<Œ1|S#ttf$rt
j|t¬«}Y�ŒwxYw)
ax
Find all masked and/or non-finite points in a set of arguments,
and return the arguments as masked arrays with a common mask.
Arguments can be in any of 5 categories:
1) 1-D masked arrays
2) 1-D ndarrays
3) ndarrays with more than one dimension
4) other non-string iterables
5) anything else
The first argument must be in one of the first four categories;
any argument with a length differing from that of the first
argument (and hence anything in category 5) then will be
passed through unchanged.
Masks are obtained from all arguments of the correct length
in categories 1, 2, and 4; a point is bad if masked in a masked
array or if it is a nan or inf. No attempt is made to
extract a mask from categories 2 and 4 if `numpy.isfinite`
does not yield a Boolean array. Category 3 is included to
support RGB or RGBA ndarrays, which are assumed to have only
valid values and which are passed through unchanged.
All input arguments that are not passed unchanged are returned
as masked arrays if any masked points are found, otherwise as
ndarrays.
r rršFrÊr›©r7T©r«)r¦rrØrirjrRrr<rœr�Ú
asanyarrayrrsr@Ú is_maskedrŸÚ
logical_orr£r6)rr¦r§r¨r©rmrËr«s rÚ_combine_masksr´æs™€ô> ˆtŒ9ØÜ˜4 ™7Ô#ÜÐ<Ó=Ð=Ü ��Q‘‹L€EØ €E؈gœ˜D› Ñ!€GØ €Eܘ$“󉈈1Ü ˜qÔ !¤S¨£V¨u¢_Ø �L‰L˜�Oä˜!œRŸU™U×.Ñ.Ô/°A·F±F¸Q²JÜ Ð!<Ó=Ð=ð
3Ü—M‘M !Ó$�ð
�v‰v˜Š{Ü'¨Ó*�Ø!�˜‘
Ü—5‘5—?‘? 1Ô%Ø—L‘L¤§¡×!3Ñ!3°AÓ!6Ô7Ø �L‰L˜ŽOð#ô$ ˆ5„zÜ�}‰}×#Ñ# EÓ*ˆÜ˜eÓ$ò 5‰DˆAˆqØ�q‹zÜŸ5™5Ÿ;™; q¨t˜;Ó4��a’ð 5ð €Løô.¬zÐ:ò
3ô—M‘M !¬6Ô2“ð
3úsÃGÇ*G/Ç.G/)ÚcompresscóÖ—|D�cgc]3}t|tjj«sŒ(|j‘Œ5}}tj
g|¢|¢­Ž}|dt
|«}|t
|«d}|r¿tjj|«}|r>|D�cgc]1}tjj||¬«j«‘Œ3}}|S|D�cgc]S}tjj||t¬«jtj«j«‘ŒU}}|S|D�cgc]}tj|«‘Œ}}|Scc}wcc}wcc}wcc}w)aw
Broadcast inputs, combining all masked arrays.
Parameters
----------
*args : array-like
The inputs to broadcast.
compress : bool, default: False
Whether to compress the masked arrays. If False, the masked values
are replaced by NaNs.
Returns
-------
list of array-like
The broadcasted and masked inputs.
Nr°)r«r7)rRrr<rœr«Úbroadcast_arraysr¦r³r£r6Ú
compressedÚfloatr¥ÚnanÚravel)rµrrfr©ÚbcastÚinputsr«s rÚ_broadcast_with_masksr¾'sF€ð$"Ö F˜¤Z°´2·5±5×3DÑ3DÕ%EˆQ�V‹VÐ F€EÐ Fä × Ñ Ð . Ð .¨Ò .€EØ
�:”C˜“IÐ
€FØ ”#�d“)�*Ð €EÙ ä�}‰}×#Ñ# EÓ*ˆá à%ö'Øô—e‘e—k‘k !¨$�kÓ/×:Ñ:Õ<ð'ˆFð'ð €Mð &ö'Øô—e‘e—k‘k !¨$´e�kÓ<×CÑCÄBÇFÁFÓK×QÑQÕSð'ˆFð'ð €Mð(.Ö. !”"—(‘(˜1•+Ð.ˆÐ.Ø €Mùò#
Gùò'ùò'ùò/s…)E¯EÂ6EÃAE!Ä7E&c󲇗dd„Šˆfd„}g}t|d«}t|«}|€tjd«}nt|«|k7r t d«‚|}t t
||««D�]ç\} \}
} i} | �| | d<|}|j| «t|
«dk(rÄtjg«| d<tj| d <tj| d
<tj| d <tj| d <tj| d
<tj| d<tj| d<tj| d<tj| d<οtjj|
«}
|
j|
jj«}
tj |
«| d <tj"|
gd¢«\}
}}||
z
| d
<| d
dk(r|rd}||
|| d
|«\| d<| d<tj$|«r*t'|t(«stj"|
|«\}}n7tj*|«r|
|| d
zz
}||| d
zz}n t d«‚|
|
|k}t|«dk(stj,|«|kr|| d<ntj,|«| d<|
|
|k\}t|«dk(stj.|«|
kDr|
| d<ntj.|«| d<tj0|
|
| dk|
|
| dkDg«| d<|
||c| d <| d
<| d <�Œê|S)aj
Return a list of dictionaries of statistics used to draw a series of box
and whisker plots using `~.Axes.bxp`.
Parameters
----------
X : array-like
Data that will be represented in the boxplots. Should have 2 or
fewer dimensions.
whis : float or (float, float), default: 1.5
The position of the whiskers.
If a float, the lower whisker is at the lowest datum above
``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum below
``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and third
quartiles. The default value of ``whis = 1.5`` corresponds to Tukey's
original definition of boxplots.
If a pair of floats, they indicate the percentiles at which to draw the
whiskers (e.g., (5, 95)). In particular, setting this to (0, 100)
results in whiskers covering the whole range of the data.
In the edge case where ``Q1 == Q3``, *whis* is automatically set to
(0, 100) (cover the whole range of the data) if *autorange* is True.
Beyond the whiskers, data are considered outliers and are plotted as
individual points.
bootstrap : int, optional
Number of times the confidence intervals around the median
should be bootstrapped (percentile method).
labels : list of str, optional
Labels for each dataset. Length must be compatible with
dimensions of *X*.
autorange : bool, optional (False)
When `True` and the data are distributed such that the 25th and 75th
percentiles are equal, ``whis`` is set to (0, 100) such that the
whisker ends are at the minimum and maximum of the data.
Returns
-------
list of dict
A list of dictionaries containing the results for each column
of data. Keys of each dictionary are the following:
======== ===================================
Key Value Description
======== ===================================
label tick label for the boxplot
mean arithmetic mean value
med 50th percentile
q1 first quartile (25th percentile)
q3 third quartile (75th percentile)
iqr interquartile range
cilo lower notch around the median
cihi upper notch around the median
whislo end of the lower whisker
whishi end of the upper whisker
fliers outliers
======== ===================================
Notes
-----
Non-bootstrapping approach to confidence interval uses Gaussian-based
asymptotic approximation:
.. math::
\mathrm{med} \pm 1.57 \times \frac{\mathrm{iqr}}{\sqrt{N}}
General approach from:
McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of
Boxplots", The American Statistician, 32:12-16.
cóЗt|«}ddg}tjj|||f¬«}||}tj|dd¬«}tj
||«}|S)Ng@g`X@)ÚsizerÊT)ÚaxisÚoverwrite_input)r¦rÚrandomÚrandintÚmedianÚ
percentile)r r5ÚMÚ percentilesÚbs_indexÚbsDataÚestimateÚCIs rÚ_bootstrap_medianz(boxplot_stats.<locals>._bootstrap_medianœsa€ä �‹IˆØ˜D�kˆ ä—9‘9×$Ñ$ Q¨a°¨VÐ$Ó4ˆØ�h‘ˆÜ—9‘9˜V¨!¸TÔBˆä
�]‰]˜8 [Ó
1ˆØˆ rcóΕ—|�‰||¬«}|d}|d}||fSt|«}|d|ztj|«z z
}|d|ztj|«z z}||fS)N)r5rrÊg…ëQ¸ù?)r¦rÚsqrt) r ÚmedÚiqrÚ bootstraprÍÚ notch_minÚ notch_maxr5rÎs €rÚ_compute_conf_intervalz-boxplot_stats.<locals>._compute_conf_interval¨s‚ø€Ø Ð ñ# 4¨9Ô5ˆBؘ1™ˆIؘ1™ˆIð˜)Ð#Ð#ô �D“ ˆAؘd S™j¬2¯7©7°1«:Ñ5Ñ5ˆIؘd S™j¬2¯7©7°1«:Ñ5Ñ5ˆIà˜)Ð#Ð#rÚXNz-Dimensions of labels and X must be compatibleÚlabelrÚfliersÚmeanrÑÚq1Úq3rÒÚciloÚcihiÚwhisloÚwhishi)éé2éK)rédz+whis must be a float or list of percentiles)iˆ)Ú _reshape_2Dr¦r€ÚrepeatrØriÚziprjrr6rºr<ržr r«r»rÚrÇrrRrïÚisrealr*r'Ú concatenate)r×ÚwhisrÓÚlabelsÚ autorangerÖÚbxpstatsÚncolsÚ
input_whisÚiirËrØÚstatsrÛrÑrÜÚlovalÚhivalÚwiskhiÚwisklorÎs @rÚ
boxplot_statsröMs8ø€ó^
ô
$ð €Hô �A�sÓ€Aä �‹F€EØ
€~Ü×!Ñ! $Ó'‰Ü ˆV‹˜Ò ÜÐHÓIÐIà€JÜ#¤C¨¨6£NÓ3óM=‰ˆ‰JˆQ�ðˆØ Ð Ø"ˆE�'‰Nðˆð �‰˜Ôô ˆq‹6�QŠ;Ü Ÿh™h r›lˆE�(‰OÜŸF™FˆE�&‰MÜŸ6™6ˆE�%‰LÜŸ&™&ˆE�$‰KÜŸ&™&ˆE�$‰KÜŸ6™6ˆE�%‰LÜŸF™FˆE�&‰MÜŸF™FˆE�&‰MÜ Ÿf™fˆE�(‰OÜ Ÿf™fˆE�(‰OØ ô
�E‰E�M‰M˜!Ó ˆØ
�F‰F�A—F‘F�7‰O× !Ñ !Ó #ˆôŸ™ ›
ˆˆf‰
ô—m‘m A¢|Ó4‰ ˆˆC�ð˜B‘wˆˆe‰ Ø �‰<˜1Ò ¡ØˆDñ(>Ø
ˆs�E˜%‘L )ó(
Ñ$ˆˆf‰
�u˜V‘}ô
�;‰;�tÔ ¤Z°´cÔ%:ÜŸ=™=¨¨DÓ1‰LˆE‘5Ü
�Y‰Y�tŒ_ؘ  e¡ Ñ,Ñ,ˆEؘ  e¡ Ñ,Ñ,‰EäÐJÓKÐ Kð�1˜‘:‘ˆÜ ˆv‹;˜!Ò œrŸv™v f›~°Ò2Ø ˆE�(ŠOä Ÿf™f V›nˆE�(‰Oð�1˜‘:‘ˆÜ ˆv‹;˜!Ò œrŸv™v f›~°Ò2Ø ˆE�(ŠOä Ÿf™f V›nˆE�(‰OôŸ.™.Ø
ˆa�%˜‘/Ñ!Ñ "Ø
ˆa�%˜‘/Ñ!Ñ "ð*
ó ˆˆh‰ð 24°S¸"Ð.ˆˆd‰ �U˜5‘\ 5¨£;ð[M=ð^ €OrÚsolidÚdashedÚdashdotÚdotted)ú-z--z-.ú:c óT—tj|t¬«}|jsgStj|dd|ddk7«\}|dz
}|j «}|drdg|z}|dr|j
t|««tt|ddd…|ddd…««S)zv
Return a list of (ind0, ind1) such that ``mask[ind0:ind1].all()`` is
True and we cover all such regions.
r¯NrÈrÊrrÇ)
rržÚboolrÁr¤Útolistrjr¦r|rç)r«Úidxs rÚcontiguous_regionsrs¨€ô
�:‰:�d¤$Ô '€Dà �9Š9؈ ô �:‰:�d˜3˜B�i 4¨¨ 8Ñ+Ó ,�D€C؈1�H€Cð �*‰*‹,€Cð ˆA‚w؈c�C‰iˆØ ˆB‚xØ �
‰
”3�t“9Ôä ”�C™˜!˜‘H˜c ! $ Q $™iÓ(Ó )Ð)rcó€—t|«}|jd«|jd«z
}|dkDxr|dzdk(}|S)z¥
Return whether the string *s* contains math expressions.
This is done by checking whether *s* contains an even number of
non-escaped dollar signs.
rÉz\$rrÇ)rïr�)rŠÚ dollar_countÚ even_dollarss rÚ is_math_textr6sF€ô ˆA‹€AØ—7‘7˜4“= 1§7¡7¨5£>Ñ1€LØ  1Ñ$Ò>¨¸Ñ)9¸QÑ)>€LØ ÐrcóЗt|d«rAtjj|t«j tj «Stj|t«S)zt
Convert a sequence to a float array; if input was a masked array, masked
values are converted to nans.
r«)rõrr<ržr¹r¥rºræs rÚ_to_unmasked_float_arrayrCsC€ô
ˆq�&ÔÜ�u‰u�}‰}˜Q¤Ó&×-Ñ-¬b¯f©fÓ5Ð5ä�z‰z˜!œUÓ#Ð#rcó¦—t|«}t|d«r$t|d«rt|j«dkrt j
|«S|S)z8Convert scalars to 1D arrays; pass-through arrays as is.r“r�rÊ)Ú_unpack_to_numpyrõr¦r“rÚ
atleast_1dræs rÚ _check_1dr NsH€ô ˜Ó€Aô
�A�wÔ Ü˜˜6Ô"Ü �—‘‹L˜1Ò Ü�}‰}˜QÓÐàˆrcóô—t|«}t|tj«rŽ|j «}t |«dk(rggS|j dk(rtj |d«dk(r|gS|j dvr$|D�cgc]}tj|d«‘Œc}St|›d�«‚t |«dk(rggSg}d}|D]}}t|t«s t|«d}tj|«}tj |«}|dkDrt|›d�«‚|j|jd««Œ|rtj|d«gS|Scc}w#t$rYŒŠwxYw)aŒ
Use Fortran ordering to convert ndarrays and lists of iterables to lists of
1D arrays.
Lists of iterables are converted by applying `numpy.asanyarray` to each of
their elements. 1D ndarrays are returned in a singleton list containing
them. 2D ndarrays are converted to the list of their *columns*.
*name* is used to generate the error message for invalid inputs.
rrÊ)rÊrÇrÈz must have 2 or fewer dimensionsTF)r rRrr¡Ú transposer¦r�rŽrØrïrŠr[r±rj)r×ÚnamerËÚresultÚis_1dÚxiÚnds rrårå]si€ô ˜Ó€Aô�!”R—Z‘ZÔ Ø
�K‰K‹Mˆä ˆq‹6�QŠ;Ø�4ˆKØ
�V‰V�qŠ[œRŸW™W Q q¡T›]¨aÒ/à�3ˆJØ
�V‰V�vÑ
à/0Ö1¨!”B—J‘J˜q "Õ%Ò1Ð 1ä ˜vÐ%EÐFÓGÐ Gô ˆ1ƒv�‚{؈tˆ à
€FØ €EØò&ˆô˜"œcÔ"ð
Ü�R”ð�Ü
�]‰]˜2Ó
ˆÜ
�W‰W�R‹[ˆØ
�Š6Ü ˜vÐ%EÐFÓGÐ GØ�
‰
�b—j‘j “nÕ%ð&ñ 
ä—
‘
˜6 2Ó&Ð'Ð'ðˆ
ùò?2øô ò
Ùð
úsÂE&Ã E+Å+ E7Å6E7có†—g}t|d«}|�t|«dk7r
t|d«}nggt|«z}t|«t|«k7r td«‚t||«D]Õ\}}i}t j
|«}t j |«} t j|d|z«}
t j|| |«} ||| «|d<| |d<t j|«|d<t j|«|d <||d
<| |d <t j|
«|d<|j|«Œ×|S) a[
Return a list of dictionaries of data which can be used to draw a series
of violin plots.
See the ``Returns`` section below to view the required keys of the
dictionary.
Users can skip this function and pass a user-defined set of dictionaries
with the same keys to `~.axes.Axes.violinplot` instead of using Matplotlib
to do the calculations. See the *Returns* section below for the keys
that must be present in the dictionaries.
Parameters
----------
X : array-like
Sample data that will be used to produce the gaussian kernel density
estimates. Must have 2 or fewer dimensions.
method : callable
The method used to calculate the kernel density estimate for each
column of data. When called via ``method(v, coords)``, it should
return a vector of the values of the KDE evaluated at the values
specified in coords.
points : int, default: 100
Defines the number of points to evaluate each of the gaussian kernel
density estimates at.
quantiles : array-like, default: None
Defines (if not None) a list of floats in interval [0, 1] for each
column of data, which represents the quantiles that will be rendered
for that column of data. Must have 2 or fewer dimensions. 1D array will
be treated as a singleton list containing them.
Returns
-------
list of dict
A list of dictionaries containing the results for each column of data.
The dictionaries contain at least the following:
- coords: A list of scalars containing the coordinates this particular
kernel density estimate was evaluated at.
- vals: A list of scalars containing the values of the kernel density
estimate at each of the coordinates given in *coords*.
- mean: The mean value for this column of data.
- median: The median value for this column of data.
- min: The minimum value for this column of data.
- max: The maximum value for this column of data.
- quantiles: The quantile values for this column of data.
r×rÚ quantileszLList of violinplot statistics and quantiles values must have the same lengthräÚvalsÚcoordsrÚrÆr'r*)
rår¦rØrçrr'r*rÇÚlinspacerÚrÆr
rj) r×ÚmethodÚpointsrÚvpstatsrËÚqrñÚmin_valÚmax_valÚ quantile_valrs rÚ violin_statsr™sH€ðj€Gô �A�sÓ€AðФ Y£°1Ò!4Ü  ¨;Ó7‰ ð�Dœ3˜q›6‘Mˆ ô ˆ1ƒv”�Y“ÒÜð6ó7ð 7ô�a˜Ó#ò‰ˆˆAàˆô—&‘&˜“)ˆÜ—&‘&˜“)ˆÜ—}‘} Q¨¨a©Ó0ˆ ô—‘˜W g¨vÓ6ˆÙ˜q &Ó)ˆˆf‰
Ø ˆˆh‰ôŸ™ ›
ˆˆf‰
ÜŸ)™) A›,ˆˆh‰Øˆˆe‰ ؈ˆe‰ ÜŸ]™]¨<Ó8ˆˆkÑð �‰�uÕð-ð0 €Nrc óú—tjdt|«ztdt|«zdz
d«f«}||dddd…f<|dddd…f|dddd…f<||dd…ddd…f<|dd…ddd…f|dd…ddd…f<|S)a(
Convert continuous line to pre-steps.
Given a set of ``N`` points, convert to ``2N - 1`` points, which when
connected linearly give a step function which changes values at the
beginning of the intervals.
Parameters
----------
x : array
The x location of the steps. May be empty.
y1, ..., yp : array
y arrays to be turned into steps; all must be the same length as ``x``.
Returns
-------
array
The x and y values converted to steps in the same order as the input;
can be unpacked as ``x_out, y1_out, ..., yp_out``. If the input is
length ``N``, each of these arrays will be length ``2N + 1``. For
``N=0``, the length will be 0.
Examples
--------
>>> x_s, y1_s, y2_s = pts_to_prestep(x, y1, y2)
rÊrÇrNéþÿÿÿ©rÚzerosr¦r*©rËrr”s rÚpts_to_prestepr%ûs¨€ô8
�H‰H�aœ#˜d›)‘m¤S¨¬S°«V©°a©¸Ó%;Ð<Ó =€Eð€Eˆ!ˆQˆT�ˆTˆ'�Nؘ1˜a  1˜f˜9Ñ%€Eˆ!ˆQˆT�ˆTˆ'�NØ€Eˆ!‰"ˆaˆd�ˆdˆ(�OؘA™B   1 ˜H‘o€Eˆ!‰"ˆaˆd�ˆdˆ(�OØ €Lrc óú—tjdt|«ztdt|«zdz
d«f«}||dddd…f<|dddd…f|dddd…f<||dd…ddd…f<|dd…ddd…f|dd…ddd…f<|S)a#
Convert continuous line to post-steps.
Given a set of ``N`` points convert to ``2N + 1`` points, which when
connected linearly give a step function which changes values at the end of
the intervals.
Parameters
----------
x : array
The x location of the steps. May be empty.
y1, ..., yp : array
y arrays to be turned into steps; all must be the same length as ``x``.
Returns
-------
array
The x and y values converted to steps in the same order as the input;
can be unpacked as ``x_out, y1_out, ..., yp_out``. If the input is
length ``N``, each of these arrays will be length ``2N + 1``. For
``N=0``, the length will be 0.
Examples
--------
>>> x_s, y1_s, y2_s = pts_to_poststep(x, y1, y2)
rÊrÇrNr!r"r$s rÚpts_to_poststepr'!s¦€ô8
�H‰H�aœ#˜d›)‘m¤S¨¬S°«V©°a©¸Ó%;Ð<Ó =€EØ€Eˆ!ˆQˆT�ˆTˆ'�Nؘ1˜a˜d ˜d˜7‘^€Eˆ!ˆQˆT�ˆTˆ'�NØ€Eˆ!‰"ˆaˆd�ˆdˆ(�OؘA™B  " Q ˜JÑ'€Eˆ!‰"ˆaˆd�ˆdˆ(�OØ €LrcóB—tjdt|«zdt|«zf«}tj|«}|dd|ddzdz x|dddd…f<|dddd…f<|dd|ddd…f<|dd|ddd…f<||dd…ddd…f<|dd…ddd…f|dd…ddd…f<|S)aø
Convert continuous line to mid-steps.
Given a set of ``N`` points convert to ``2N`` points which when connected
linearly give a step function which changes values at the middle of the
intervals.
Parameters
----------
x : array
The x location of the steps. May be empty.
y1, ..., yp : array
y arrays to be turned into steps; all must be the same length as
``x``.
Returns
-------
array
The x and y values converted to steps in the same order as the input;
can be unpacked as ``x_out, y1_out, ..., yp_out``. If the input is
length ``N``, each of these arrays will be length ``2N``.
Examples
--------
>>> x_s, y1_s, y2_s = pts_to_midstep(x, y1, y2)
rÊrÇNrÈr)rr#r¦r±r$s rÚpts_to_midstepr)EsÜ€ô8
�H‰H�aœ#˜d›)‘m Q¬¨Q«¡ZÐ0Ó 1€EÜ
�
‰
�aÓ€AØ)*¨3¨B¨°!°A°B°%©¸1Ñ(<Ð<€Eˆ!ˆQˆr�!ˆVˆ)Ñ�u˜Q   1 ˜W‘~Ø�R�a�5€Eˆ!ˆRˆaˆRˆ%�LØ�b�c�F€Eˆ!ˆR‰Sˆ&�MØ€Eˆ!‰"ˆaˆd�ˆdˆ(�OؘA™B   1 ˜H‘o€Eˆ!‰"ˆaˆd�ˆdˆ(�OØ €Lrcó
—||fSr
r )rËÚys rú<lambda>r,ks
€¨A¨q¨6€r)Údefaultr”z steps-prez
steps-postz steps-midcó — |jj«|j«fS#t$rYnwxYw t|«}t j
|j dt¬«|fS#ttf$r
Ytd«‚wxYw)aâ
A helper function to create reasonable x values for the given *y*.
This is used for plotting (x, y) if x values are not explicitly given.
First try ``y.index`` (assuming *y* is a `pandas.Series`), if that
fails, use ``range(len(y))``.
This will be extended in the future to deal with more types of
labeled data.
Parameters
----------
y : float or array-like
Returns
-------
x, y : ndarray
The x and y values to plot.
rr¯z5Input could not be cast to an at-least-1D NumPy array)
rGÚto_numpyÚAttributeErrorr rr�r“r¹rrØ)r+s rÚindex_ofr1rsŒ€ð*
Ø�w‰w×ÑÓ! 1§:¡:£<Ð/Ð/øÜ ò
Ù ð
úð5Ü �a‹Lˆô
�y‰y˜Ÿ™ ™¬5Ô1°1Ð4Ð4øô
&¤zÐ 2ò
à ô ÐLÓ
MÐMð 
ús‚),¬ 8·8¼ A1Á1B
 B
có°—t|tjj«r |dSt
t|««S#t$r
Yt d«‚wxYw)z¬
Return the first element in *obj*.
This is a type-independent way of obtaining the first element,
supporting both index access and the iterator protocol.
rú/matplotlib does not support generators as input)rRÚ collectionsÚabcÚIteratorr[Ú RuntimeErrorr‰rŠrãs rÚsafe_first_elementr8•sV€ô�#”{—‘×/Ñ/Ô0ð
 Ø�q‘6ˆMô ”�S“ ‹?Ðøôò Ø ÜÐLÓMÐMð ús¦?¿ AÁAcóà—d„}t|tj«r|dSt|tjj
«r t
d«‚|D]}||«sŒ |cSt|«S)a:
Return the first finite element in *obj* if one is available and skip_nonfinite is
True. Otherwise, return the first element.
This is a method for internal use.
This is a type-independent way of obtaining the first finite element, supporting
both index access and the iterator protocol.
cóÖ—|€y tj|«S#ttf$rYnwxYw t j
|«rt j|«SdS#t$rYywxYw)NFT)Úmathr>r[rØrÚisscalarrs rÚ
safe_isfinitez)_safe_first_finite.<locals>.safe_isfinite³so€Ø ˆ;Øð Ü—=‘= Ó%Ð %øÜœ:Ð&ò ñ
ð  úð
 Ü')§{¡{°3Ô'7”2—;‘;˜sÓ#Ð A¸TÐ AøÜò ñð ús#…š,«,°)AÁAÁ A(Á'A(rr3)rRrÚflatiterr4r5r6r7r8)rNr=rs rÚ_safe_first_finiter?©si€òô"�#”r—{‘{Ô#à�1‰vˆ
Ü �CœŸ™×1Ñ1Ô 2ÜÐLÓMÐMàò ˆCÙ˜SÕ!Ø’
ð ô" #Ó&Ð&rcód—t|tjj«r t |«S|S)zP
Convert dictview objects to list. Other inputs are returned unchanged.
)rRr4r5Ú MappingViewr|)r s rÚsanitize_sequencerBÐs+€ô% T¬;¯?©?×+FÑ+FÔGŒD�‹JðØðrcó–—ddlm}|€iS|€i}n5t|t«r t ||«s t||«r
t |di«}|j
«D���cic]\}}|D]}||“ŒŒ}}}}i}i}|j
«D]:\} }
|j| | «}||vrtd||›d| ›d�«‚| ||<|
||<Œ<|Scc}}}w)aA
Helper function to normalize kwarg inputs.
Parameters
----------
kw : dict or None
A dict of keyword arguments. None is explicitly supported and treated
as an empty dict, to support functions with an optional parameter of
the form ``props=None``.
alias_mapping : dict or Artist subclass or Artist instance, optional
A mapping between a canonical name to a list of aliases, in order of
precedence from lowest to highest.
If the canonical value is not in the list it is assumed to have the
highest priority.
If an Artist subclass or instance is passed, use its properties alias
mapping.
Raises
------
TypeError
To match what Python raises if invalid arguments/keyword arguments are
passed to a callable.
r)ÚArtistÚ
_alias_mapz Got both z and z", which are aliases of one another) Úmatplotlib.artistrDrRrÚ
issubclassrârˆr/r[) ÚkwÚ
alias_mappingrDÚ canonicalÚ
alias_listÚaliasÚ to_canonicalÚcanonical_to_seenÚretrfrgs rÚnormalize_kwargsrPØs€õ6)à €z؈ ðÐØ‰
Ü
�]¤DÔ
)¬j¸ÈÔ.OÜ
˜
 vÔ
.Ü 
¨|¸RÓ@ˆ
ð2?×1DÑ1DÓ1F÷-ð-Ù-˜  :Ø!+ò-àð˜9Ñ$ð-�Eð-€Lò-ðÐØ
€Cà—‘“
ò‰ˆˆ1Ø ×$Ñ$ Q¨Ó*ˆ Ø Ð)Ñ )ܘiÐ(9¸)Ñ(DÐ'GÀuØ ˜eÐ#EðGóHð
Hà'(И)Ñ$؈ˆIŠð
ð €Jùô-sÁCc#óªK—t|«}|j|jdz«}d}d}t|«D]} |j d«5 ddd«ntdj|««‚ d–—|j«y#1swYnxYwŒ_#t
$rt
j|«YŒwxYw#|j«wxYw­w)af
Context manager for locking a path.
Usage::
with _lock_path(path):
...
Another thread or process that attempts to lock the same path will wait
until this context manager is exited.
The lock is implemented by creating a temporary file in the parent
directory, so that directory must exist and be writable.
z.matplotlib-lockrâgš™™™™™¹?ÚxbNzÛLock error: Matplotlib failed to acquire the following lock file:
{}
This maybe due to another process holding this lock file. If you are sure no
other Matplotlib process is running, remove this file and try again.) rÚ with_namerÚrangeròÚFileExistsErrorÚtimeÚsleepÚ TimeoutErrorÚformatÚunlink)rÚ lock_pathÚretriesÚ sleeptimeÚ_s rÚ
_lock_pathr_sÝèø€ô �‹:€DØ—‘˜tŸy™yÐ+=Ñ=Ó>€IØ€GØ€IÜ
�7‹^ò ˆð "Ø—‘ Ó%ñ
Ø÷
ñ
ð ôðH÷IOÉØ óIó ð ð Û
à×ÑÕ÷
ð
úð
øäò "Ü �J‰J�yÖ !ð "ûð ×ÑÕüs^‚<C¿BÁB
ÁBÁCÁ8B>Á<CÂ
B ÂBÂCÂB;Â8CÂ:B;Â;CÂ>CÃCÚzorderr{có$—|t|««S)a
Get the topmost artist of a list.
In case of a tie, return the *last* of the tied artists, as it will be
drawn on top of the others. `max` returns the first maximum in case of
ties, so we need to iterate over the list in reverse order.
)Úreversed)ÚartistsÚ _cached_maxs rÚ_topmost_artistre7s€ñ ”x Ó(Ó )Ð)rcó0—t|t«xr||k(S)a
Return whether *obj* is a string equal to string *s*.
This helper solely exists to handle the case where *obj* is a numpy array,
because in such cases, a naive ``obj == s`` would yield an array, which
cannot be used in a boolean context.
)rRrï©rNrŠs rÚ
_str_equalrhDs€ô �cœ3Ó Ò , C¨1¡HÐ,rcóL—t|t«xr|j«|k(S)a
Return whether *obj* is a string equal, when lowercased, to string *s*.
This helper solely exists to handle the case where *obj* is a numpy array,
because in such cases, a naive ``obj == s`` would yield an array, which
cannot be used in a boolean context.
)rRrïr
rgs rÚ_str_lower_equalrjOs!€ô �cœ3Ó Ò 4 C§I¡I£K°1Ñ$4Ð4rcó®—tjdd}tjddd…}tj|d|f||df|d|f||dff«S)aZ
Get the elements on the perimeter of *arr*.
Parameters
----------
arr : ndarray, shape (M, N)
The input array.
Returns
-------
ndarray, shape (2*(M - 1) + 2*(N - 1),)
The elements on the perimeter of the array::