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

78 lines
12 KiB
Plaintext
Raw Normal View History

Ë
†Rj#ãóH—ddlmZddlmZmZddlmZddlZddl m
Z
m Z m Z ddl
mZmZmZmZmZmZerddlmZdd„Z dd„Zdd „Zdd
„Zdd „Zd d „Z d!d
„Zd"d„Z d#d„Z d#d„Z d"d„Z!d$d„Z"d%d„Z#d&d„Z$d'd„Z%d d„Z&d(d„Z'd)d„Z( d*d„Z)d+d„Z*y),é)Ú annotations)ÚchainÚpairwise)Ú
TYPE_CHECKINGN)Úcheck_code_arrayÚcheck_offset_arrayÚcheck_point_array)Ú CLOSEPOLYÚLINETOÚMOVETOÚ
code_dtypeÚ offset_dtypeÚ point_dtypecóœ—t|«|d}tj|tt¬«}t
||dd<t ||dddz
<|S)zSDetermine codes from offsets, assuming they all correspond to closed polygons.
éÿÿÿÿ©ÚdtypeNé)rÚnpÚfullr r
r r
)ÚoffsetsÚnÚcodess úR/home/antigravity/intellecton/venv/lib/python3.12/site-packages/contourpy/array.pyÚcodes_from_offsetsrsP€ô�wÔà�‰ €AÜ �G‰G�A”v¤ZÔ 0€EÜ €Eˆ'�#�2ˆ,ÑÜ&€Eˆ'�!�"ˆ+˜‰/ÑØ €Lócó
—t|«t|«tjt |«t
t ¬«}t||dd<|dddz
}tj||dd||k(d¬«}t|||<|S)z–Determine codes from offsets and points, using the equality of the start and end points of
each line to determine if lines are closed or not.
rNrr©Úaxis)
rr rrÚlenr r
r Úallr
)rÚpointsrÚ end_offsetsÚcloseds rÚcodes_from_offsets_and_pointsr%s‚€ô�wÔÜ�fÔä �G‰G”C˜“K¤¬zÔ :€EÜ €Eˆ'�#�2ˆ,Ñà˜!˜"�+ ‘/€KÜ
�V‰V�F˜7 3 B˜<Ñ(¨F°;Ñ,?Ñ?ÀaÔ
H€FÜ!*€Eˆ+�fÑ
Ñà €LrcóÒ—t|«t|«}tj|tt
¬«}t |d<tj|d|dk(«r t|d<|S)z…Determine codes for a single line, using the equality of the start and end points to
determine if the line is closed or not.
rrr) r r rrr r
r r!r
)r"rrs rÚcodes_from_pointsr'/sW€ô�fÔä ˆF‹ €AÜ �G‰G�A”v¤ZÔ 0€EÜ€Eˆ!�HÜ ‡v�vˆf�Q‰i˜6 "™:Ñ%Ô&܈ˆb‰ Ø €LrcóR—|s td«‚tj|t¬«S)zAConcatenate a list of codes arrays into a single code array.
z!Empty list passed to concat_codesr)Ú
ValueErrorrÚ concatenater
)Ú
list_of_codess rÚ concat_codesr,=s$€ñ ÜÐ<Ó=Ð=ä
�>‰>˜-¬zÔ :Ð:rcóL—|D�cgc]}|€Œ|‘Œ }}|r t|«Sycc}w)zQConcatenate a list of codes arrays or None into a single code array or None.
N)r,)Úlist_of_codes_or_nonerr+s rÚconcat_codes_or_noner/Fs3€ð)>ÖS˜uÀÑAR’UÐS€MÐSÙܘMÓ*Ð*àùò Tó…!�!có ‡‡—‰s td«‚t‰«}tj‰D�cgc]}|d‘Œ c}t¬«Štj
‰dgˆˆfd„t
|dz
«D«¢­t¬«}|Scc}w)zEConcatenate a list of offsets arrays into a single offset array.
z#Empty list passed to concat_offsetsrrrc3ó@•K—|]}‰|dzdd‰|z–—Œy­w)rN©)Ú.0ÚiÚ
cumulativeÚlist_of_offsetss €€rú <genexpr>z!concat_offsets.<locals>.<genexpr>Ys*øèø€Ò\ÈA˜¨q°©sÑ3°A°BÐ7¸*ÀQ¹-ÕGÑ\ùsƒr)r)r rÚcumsumrr*Úrange)r7rrÚretr6s` @rÚconcat_offsetsr<Ps~ù€ñ ÜÐ>Ó?Ð?ä ˆOÓ€AÜ—‘°ÖG¨G˜G B›KÒGÌ|Ô\€JÜŸ>™>Ø ˜Ñ Ð]Ô\ÔQVÐWXÐYZÑWZÓQ[Ô\Ñ]Üô€Cð €Jùò Hs® BcóL—|D�cgc]}|€Œ|‘Œ }}|r t|«Sycc}w)zUConcatenate a list of offsets arrays or None into a single offset array or None.
N)r<)Úlist_of_offsets_or_nonerr7s rÚconcat_offsets_or_noner?_s4€ð
/FÖ] 7ÈÑI\’wÐ]€OÐ]ÙܘoÓ.Ð.àùò ^r0cóR—|s td«‚tj|t¬«S)zBConcatenate a list of point arrays into a single point array.
z"Empty list passed to concat_pointsr)r)rr*r)Úlist_of_pointss rÚ
concat_pointsrBks$€ñ ÜÐ=Ó>Ð>ä
�>‰>˜.´ Ô <Ð<rcóL—|D�cgc]}|€Œ|‘Œ }}|r t|«Sycc}w)zRConcatenate a list of point arrays or None into a single point array or None.
N)rB©Úlist_of_points_or_noner"rAs rÚconcat_points_or_nonerFts4€ð
,BÖX ÀVÑEW’fÐX€NÐXÙܘ^Ó,Ð,àùò Yr0cóL—|D�cgc]}|€Œ|‘Œ }}|r t|«Sycc}w)zvConcatenate a list of points or None into a single point array or None, with NaNs used to
separate each line.
N)Úconcat_points_with_nanrDs rÚconcat_points_or_none_with_nanrI€s4€ð ,BÖX ÀVÑEW’fÐX€NÐXÙÜ% nÓ5Ð5àùò Yr0c óô‡—|s td«‚t|«dk(r|dStjdtjt
¬«Š|dgt
tˆfd„|ddD«Ž«¢}t|«S)zaConcatenate a list of points into a single point array with NaNs used to separate each line.
z+Empty list passed to concat_points_with_nanrr)rérc3ó&•K—|]}‰|f–—Œ
y­w)Nr3)r4ÚxÚ
nan_spacers €rr8z)concat_points_with_nan.<locals>.<genexpr>˜søèø€Ò'T¸A¨°Q¬Ñ'TùsƒN) r)r rrÚnanrÚlistrrB)rArNs @rrHrH�sø€ñ ÜÐFÓGÐGä
ˆ>Ó˜aÒØ˜aÑ Ð ä—W‘W˜V¤R§V¡V´;Ô?ˆ
Ø(¨Ñ+ðXܤÓ'TÀÐPQÐPRÐASÔ'TÐ UÓVðXˆä˜^Ó,Ð,rcó2—t|«t|«t|«dkr|Stjtj
tj
gt ¬«}tj||ddjtj«|d¬«S)zNInsert NaNs into a point array at locations specified by an offset array.
rKrrrrr)
r rr rÚarrayrOrÚinsertÚastypeÚint64)r"rrNs rÚinsert_nan_at_offsetsrVœsm€ô�fÔÜ�wÔä
ˆ7ƒ|�qÒØˆ
ä—X‘XœrŸv™v¤r§v¡vÐ.´kÔBˆ
ä�y‰y˜ ¨¨2 ×!5Ñ!5´b·h±hÓ!?ÀÐRSÔTÐTrcó¶—t|«tjtj|tk(«dt |««j
t«S)zBDetermine offsets from codes using locations of MOVETO codes.
r)rrÚappendÚnonzeror r rTr)rs rÚoffsets_from_codesrZªs>€ô�UÔä
�9‰9”R—Z‘Z ¬¡Ó0°Ñ3´S¸³ZÓ @× GÑ GÌ Ó UÐUrc ó’—|s td«‚tjdg|D�cgc]
}t|«‘Œc}zt¬«Scc}w)z4Determine offsets from lengths of point arrays.
z)Empty list passed to offsets_from_lengthsrr©r)rr9r r)rAÚlines rÚoffsets_from_lengthsr^²s=€ñ ÜÐDÓEÐEä
�9‰9�a�S°.ÖA¨$œC �IÒAÑAÌÔ VÐVùÒAs£A
c
ó´—|s td«‚tjdg|D�cgc]}tj|tk(«‘Œ c}zt
¬«Scc}w)zHDetermine outer offsets from codes using locations of MOVETO codes.
z5Empty list passed to outer_offsets_from_list_of_codesrr)r)rr9Ú
count_nonzeror r)r+rs rÚ outer_offsets_from_list_of_codesra»sM€ñ ÜÐPÓQÐQä
�9‰9�a�SÈ=ÖYÀ%œB×,Ñ,¨U´f©_Õ=ÒYÑYÜ'ô )ð)ùÒYs£#A
c ó˜—|s td«‚tjdg|D�cgc]}t|«dz
‘Œc}zt¬«Scc}w)z4Determine outer offsets from a list of offsets.