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

78 lines
12 KiB
Text
Raw Normal View History

<EFBFBD>
<00>Rj#<00><01>H<00>ddlmZddlmZmZddlmZddlZddl m
Z
m Z m Z ddl mZmZmZmZmZmZerddlmZdd<07>Z dd<08>Zdd <09>Zdd
<EFBFBD>Zdd <0B>Zd d <0C>Z d!d <0A>Zd"d<0E>Z d#d<0F>Z d#d<10>Z d"d<11>Z!d$d<12>Z"d%d<13>Z#d&d<14>Z$d'd<15>Z%d d<16>Z&d(d<17>Z'd)d<18>Z( d*d<19>Z)d+d<1A>Z*y),<2C>)<01> annotations)<02>chain<69>pairwise)<01> TYPE_CHECKINGN)<03>check_code_array<61>check_offset_array<61>check_point_array)<06> CLOSEPOLY<4C>LINETO<54>MOVETO<54>
code_dtype<EFBFBD> offset_dtype<70> point_dtypec<01><><00>t|<00>|d}tj|tt<00><02>}t
||dd<t ||dddz
<|S)zSDetermine codes from offsets, assuming they all correspond to closed polygons.
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01>dtypeN<65>)r<00>np<6E>fullr r r r
)<03>offsets<74>n<>codess <20>R/home/antigravity/intellecton/venv/lib/python3.12/site-packages/contourpy/array.py<70>codes_from_offsetsrsP<00><00><17>w<EFBFBD><1F><0F><02> <0B>A<EFBFBD> <0E>G<EFBFBD>G<EFBFBD>A<EFBFBD>v<EFBFBD>Z<EFBFBD> 0<>E<EFBFBD> <20>E<EFBFBD>'<27>#<23>2<EFBFBD>,<2C><17>&<26>E<EFBFBD>'<27>!<21>"<22>+<2B><01>/<2F><1A> <10>L<EFBFBD>c<01>
<00>t|<00>t|<01>tjt |<01>t
t <00><01>}t||dd<|dddz
}tj||dd||k(d<04><05>}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<00><01>axis)
rr rr<00>lenr r r <00>allr
)r<00>pointsr<00> end_offsets<74>closeds r<00>codes_from_offsets_and_pointsr%s<><00><00><17>w<EFBFBD><1F><15>f<EFBFBD><1D> <0E>G<EFBFBD>G<EFBFBD>C<EFBFBD><06>K<EFBFBD><16>z<EFBFBD> :<3A>E<EFBFBD> <20>E<EFBFBD>'<27>#<23>2<EFBFBD>,<2C><17><19>!<21>"<22>+<2B><01>/<2F>K<EFBFBD> <0F>V<EFBFBD>V<EFBFBD>F<EFBFBD>7<EFBFBD>3<EFBFBD>B<EFBFBD><<3C>(<28>F<EFBFBD>;<3B>,?<3F>?<3F>a<EFBFBD> H<>F<EFBFBD>!*<2A>E<EFBFBD>+<2B>f<EFBFBD>
<1D><1E> <10>Lrc<01><><00>t|<00>t|<00>}tj|tt
<00><01>}t |d<tj|d|dk(<00>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<00>codes_from_pointsr'/sW<00><00><16>f<EFBFBD><1D> <0B>F<EFBFBD> <0B>A<EFBFBD> <0E>G<EFBFBD>G<EFBFBD>A<EFBFBD>v<EFBFBD>Z<EFBFBD> 0<>E<EFBFBD><15>E<EFBFBD>!<21>H<EFBFBD> <09>v<EFBFBD>v<EFBFBD>f<EFBFBD>Q<EFBFBD>i<EFBFBD>6<EFBFBD>"<22>:<3A>%<25>&<26><1D><05>b<EFBFBD> <09> <10>Lrc<01>R<00>|s td<01><00>tj|t<00><02>S)zAConcatenate a list of codes arrays into a single code array.
z!Empty list passed to concat_codesr)<04>
ValueErrorr<00> concatenater )<01> list_of_codess r<00> concat_codesr,=s$<00><00> <19><18><<3C>=<3D>=<3D> <0A>><3E>><3E>-<2D>z<EFBFBD> :<3A>:rc<01>L<00>|D<00>cgc]}|<01><01>|<01><02> }}|r t|<02>Sycc}w)zQConcatenate a list of codes arrays or None into a single code array or None.
N)r,)<03>list_of_codes_or_nonerr+s r<00>concat_codes_or_noner/Fs3<00><00>)><3E>S<>u<EFBFBD><15>AR<41>U<EFBFBD>S<>M<EFBFBD>S<><14><1B>M<EFBFBD>*<2A>*<2A><13><> T<01><00>!<04>!c<01> <00><00><04><00>s td<01><00>t<00><00>}tj<00>D<00>cgc]}|d<00><02> c}t<00><03><00>tj
<00>dg<01><04>fd<05>t |dz
<00>D<00><00><01>t<00><03>}|Scc}w)zEConcatenate a list of offsets arrays into a single offset array.
z#Empty list passed to concat_offsetsrrrc3<01>@<00>K<00>|]}<01>|dzdd<00>|z<00><01><00>y<01>w)rN<>)<04>.0<EFBFBD>i<>
cumulative<EFBFBD>list_of_offsetss <20><>r<00> <genexpr>z!concat_offsets.<locals>.<genexpr>Ys*<00><><00><><00>\<5C>A<EFBFBD><EFBFBD>q<EFBFBD><11>s<EFBFBD>3<>A<EFBFBD>B<EFBFBD>7<>*<2A>Q<EFBFBD>-<2D>G<>\<5C>s<00>r)r)r r<00>cumsumrr*<00>range)r7rr<00>retr6s` @r<00>concat_offsetsr<Ps~<00><><00> <1B><18>><3E>?<3F>?<3F> <0B>O<EFBFBD><1C>A<EFBFBD><13><19><19><EFBFBD>G<>G<EFBFBD>G<EFBFBD>B<EFBFBD>K<EFBFBD>G<>|<7C>\<5C>J<EFBFBD><1D>><3E>><3E> <18><11> <1B>]<5D>\<5C>QV<51>WX<57>YZ<59>WZ<57>Q[<5B>\<5C>]<5D><1A><06>C<EFBFBD> <0F>J<EFBFBD><4A> Hs<00> Bc<01>L<00>|D<00>cgc]}|<01><01>|<01><02> }}|r t|<02>Sycc}w)zUConcatenate a list of offsets arrays or None into a single offset array or None.
N)r<)<03>list_of_offsets_or_nonerr7s r<00>concat_offsets_or_noner?_s4<00><00>
/F<01>]<5D>7<EFBFBD><17>I\<5C>w<EFBFBD>]<5D>O<EFBFBD>]<5D><16><1D>o<EFBFBD>.<2E>.<2E><13><> ^r0c<01>R<00>|s td<01><00>tj|t<00><02>S)zBConcatenate a list of point arrays into a single point array.
z"Empty list passed to concat_pointsr)r)rr*r)<01>list_of_pointss r<00> concat_pointsrBks$<00><00> <1A><18>=<3D>><3E>><3E> <0A>><3E>><3E>.<2E> <0B> <<3C><rc<01>L<00>|D<00>cgc]}|<01><01>|<01><02> }}|r t|<02>Sycc}w)zRConcatenate a list of point arrays or None into a single point array or None.
N)rB<00><03>list_of_points_or_noner"rAs r<00>concat_points_or_nonerFts4<00><00>
,B<01>X<><16>V<EFBFBD>EW<45>f<EFBFBD>X<>N<EFBFBD>X<><15><1C>^<5E>,<2C>,<2C><13><> Yr0c<01>L<00>|D<00>cgc]}|<01><01>|<01><02> }}|r t|<02>Sycc}w)zvConcatenate a list of points or None into a single point array or None, with NaNs used to
separate each line.
N)<01>concat_points_with_nanrDs r<00>concat_points_or_none_with_nanrI<00>s4<00><00> ,B<01>X<><16>V<EFBFBD>EW<45>f<EFBFBD>X<>N<EFBFBD>X<><15>%<25>n<EFBFBD>5<>5<><13><> Yr0c <01><><00><01>|s td<01><00>t|<00>dk(r|dStjdtjt
<00><05><00>|dgt t<00>fd<06>|ddD<00><00><00><00>}t|<00>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<00>rc3<01>&<00>K<00>|]}<01>|f<02><01><00>
y<00>w)Nr3)r4<00>x<>
nan_spacers <20>rr8z)concat_points_with_nan.<locals>.<genexpr><3E>s<00><><00><><00>'T<>A<EFBFBD><1A>Q<EFBFBD><0F>'T<>s<00>N) r)r rr<00>nanr<00>listrrB)rArNs @rrHrH<00>s<00><><00> <1A><18>F<>G<>G<>
<EFBFBD>><3E><1A>a<EFBFBD><1F><1D>a<EFBFBD> <20> <20><17>W<EFBFBD>W<EFBFBD>V<EFBFBD>R<EFBFBD>V<EFBFBD>V<EFBFBD>;<3B>?<3F>
<EFBFBD>(<28><11>+<2B>X<01><1F><05>'T<><1E>PQ<50>PR<50>AS<41>'T<> U<>V<>X<01><0E><1C>^<5E>,<2C>,rc<01>2<00>t|<00>t|<01>t|<01>dkr|Stjtj
tj
gt <00><02>}tj||ddjtj<00>|d<05><06>S)zNInsert NaNs into a point array at locations specified by an offset array.
rKrrrrr)
r rr r<00>arrayrOr<00>insert<72>astype<70>int64)r"rrNs r<00>insert_nan_at_offsetsrV<00>sm<00><00><16>f<EFBFBD><1D><16>w<EFBFBD><1F>
<EFBFBD>7<EFBFBD>|<7C>q<EFBFBD><18><15> <0A><17>X<EFBFBD>X<EFBFBD>r<EFBFBD>v<EFBFBD>v<EFBFBD>r<EFBFBD>v<EFBFBD>v<EFBFBD>.<2E>k<EFBFBD>B<>
<EFBFBD><11>y<EFBFBD>y<EFBFBD><16><17><11>2<EFBFBD><1D>!5<>!5<>b<EFBFBD>h<EFBFBD>h<EFBFBD>!?<3F><1A>RS<52>T<>Trc<01><><00>t|<00>tjtj|tk(<00>dt |<00><00>j t<00>S)zBDetermine offsets from codes using locations of MOVETO codes.
r)rr<00>append<6E>nonzeror r rTr)rs r<00>offsets_from_codesrZ<00>s><00><00><15>U<EFBFBD><1B> <0A>9<EFBFBD>9<EFBFBD>R<EFBFBD>Z<EFBFBD>Z<EFBFBD><05><16><0F>0<><11>3<>S<EFBFBD><15>Z<EFBFBD> @<40> G<> G<> <0C> U<>Urc <01><><00>|s td<01><00>tjdg|D<00>cgc] }t|<01><00><02>c}zt<00><03>Scc}w)z4Determine offsets from lengths of point arrays.
z)Empty list passed to offsets_from_lengthsrr<00>r)rr9r r)rA<00>lines r<00>offsets_from_lengthsr^<00>s=<00><00> <1A><18>D<>E<>E<> <0A>9<EFBFBD>9<EFBFBD>a<EFBFBD>S<EFBFBD>.<2E>A<>$<24>C<EFBFBD><04>I<EFBFBD>A<>A<><1C> V<>V<><56>As<00>A
c
<01><><00>|s td<01><00>tjdg|D<00>cgc]}tj|tk(<00><00><02> c}zt
<00><03>Scc}w)zHDetermine outer offsets from codes using locations of MOVETO codes.
z5Empty list passed to outer_offsets_from_list_of_codesrr)r)rr9<00> count_nonzeror r)r+rs r<00> outer_offsets_from_list_of_codesra<00>sM<00><00> <19><18>P<>Q<>Q<> <0A>9<EFBFBD>9<EFBFBD>a<EFBFBD>S<EFBFBD>=<3D>Y<>%<25>B<EFBFBD>,<2C>,<2C>U<EFBFBD>f<EFBFBD>_<EFBFBD>=<3D>Y<>Y<>'<27> )<29>)<29><>Ys<00>#A
c <01><><00>|s td<01><00>tjdg|D<00>cgc]}t|<01>dz
<00><02>c}zt<00><04>Scc}w)z4Determine outer offsets from a list of offsets.
z7Empty list passed to outer_offsets_from_list_of_offsetsrrrr\)r7rs r<00>"outer_offsets_from_list_of_offsetsrc<00>sB<00><00> <1B><18>R<>S<>S<> <0A>9<EFBFBD>9<EFBFBD>a<EFBFBD>S<EFBFBD>/<2F>J<>w<EFBFBD>C<EFBFBD><07>L<EFBFBD><11>N<EFBFBD>J<>J<>R^<5E> _<>_<><5F>Js<00>A
c<01><><00>t|<00>tjtj|dd<01>df<00><00>d}t |<01>dk(r(|tj
dt |<00>gt <00><03>fStj||d<02><04>}|tjt |<01><00>z}tjt |<01>dzt <00><03>}d|d<||ddt |<00>|d<||fS)z^Remove NaN from a points array, also return the offsets corresponding to the NaN removed.
NrrrrKrr)
r rrY<00>isnanr rRr<00>delete<74>arange<67>empty)r"<00> nan_offsetsrs r<00>
remove_nanrj<00>s<><00><00><16>f<EFBFBD><1D><14>*<2A>*<2A>R<EFBFBD>X<EFBFBD>X<EFBFBD>f<EFBFBD>Q<EFBFBD><01>T<EFBFBD>l<EFBFBD>3<>4<>Q<EFBFBD>7<>K<EFBFBD>
<EFBFBD>;<3B><17>1<EFBFBD><1C><15>r<EFBFBD>x<EFBFBD>x<EFBFBD><11>C<EFBFBD><06>K<EFBFBD> 0<> <0C>E<>E<>E<><13><19><19>6<EFBFBD>;<3B>Q<EFBFBD>7<><06><13>r<EFBFBD>y<EFBFBD>y<EFBFBD><13>[<5B>!1<>2<>2<> <0B>#%<25>8<EFBFBD>8<EFBFBD>C<EFBFBD> <0B>,<<3C>Q<EFBFBD>,><3E>l<EFBFBD>#S<><07><16><07><01>
<EFBFBD>#<23><07><01>"<22> <0A><19>&<26>k<EFBFBD><07><02> <0B><15>w<EFBFBD><EFBFBD>rc<01><><00>t|<00>t|<01>t|<01>dkDrtj||dd<00>S|gS)z]Split a code array at locations specified by an offset array into a list of code arrays.
rKrr)rrr r<00>split)rrs r<00>split_codes_by_offsetsrm<00>s><00><00><15>U<EFBFBD><1B><16>w<EFBFBD><1F>
<EFBFBD>7<EFBFBD>|<7C>a<EFBFBD><17><11>x<EFBFBD>x<EFBFBD><05>w<EFBFBD>q<EFBFBD><12>}<7D>-<2D>-<2D><15>w<EFBFBD>rc<01><><00>t|<00>t|<01>t|<01>dkDrtj||dd<00>S|gS)z_Split a point array at locations specified by an offset array into a list of point arrays.
rKrr)r rr rrl)r"rs r<00>split_points_by_offsetsro<00>s><00><00> <16>f<EFBFBD><1D><16>w<EFBFBD><1F>
<EFBFBD>7<EFBFBD>|<7C>a<EFBFBD><17><11>x<EFBFBD>x<EFBFBD><06><07><01>"<22> <0A>.<2E>.<2E><16>x<EFBFBD>rc<01>8<00>t|<00>tjtj|dd<01>df<00><00>d}t |<01>dk(r|gStj
dg|t |<00>gf<03>}t |<01>D<00><02>cgc] \}}||dz|<00><02>c}}Scc}}w)z>Split a points array at NaNs into a list of point arrays.
Nrrr)r rrYrer r*r)r"ri<00>s<>es r<00>split_points_at_nanrs<00>s<><00><00><16>f<EFBFBD><1D><14>*<2A>*<2A>R<EFBFBD>X<EFBFBD>X<EFBFBD>f<EFBFBD>Q<EFBFBD><01>T<EFBFBD>l<EFBFBD>3<>4<>Q<EFBFBD>7<>K<EFBFBD>
<EFBFBD>;<3B><17>1<EFBFBD><1C><16>x<EFBFBD><0F><18>n<EFBFBD>n<EFBFBD>r<EFBFBD>d<EFBFBD>K<EFBFBD>#<23>f<EFBFBD>+<2B><1D>%G<>H<> <0B>*2<>;<3B>*?<3F>@<40>$<24>!<21>Q<EFBFBD><06>q<EFBFBD><11>s<EFBFBD>1<EFBFBD> <0A>@<40>@<40><>@s<00>B)r<00>cpy.OffsetArray<61>return<72> cpy.CodeArray)rrtr"<00>cpy.PointArrayrurv)r"rwrurv)r+<00>list[cpy.CodeArray]rurv)r.zlist[cpy.CodeArray | None]ruzcpy.CodeArray | None)r7zlist[cpy.OffsetArray]rurt)r>zlist[cpy.OffsetArray | None]ruzcpy.OffsetArray | None)rA<00>list[cpy.PointArray]rurw)rEzlist[cpy.PointArray | None]ruzcpy.PointArray | None)r"rwrrtrurw)rrvrurt)rAryrurt)r+rxrurt)r"rwruz&tuple[cpy.PointArray, cpy.OffsetArray])rrvrrtrurx)r"rwrrtrury)r"rwrury)+<2B>
__future__r<00> itertoolsrr<00>typingr<00>numpyr<00>contourpy.typecheckrrr <00>contourpy.typesr
r r r rr<00>contourpy._contourpy<70>
_contourpy<EFBFBD>cpyrr%r'r,r/r<r?rBrFrIrHrVrZr^rarcrjrmrorsr3rr<00><module>r<>s<><00><01>"<22>%<25> <20><12>W<>W<>\<5C>\<5C><10>&<26> <11><11> <1C><11> <1A><11><13><11>( <11>;<3B><14> <0F> <14>9<> <14><1B> <14>=<3D> <14>7<> <14><1A> <14>
<14>7<>
<14><1A>
<14> -<2D> U<01>V<01>W<01>)<29>`<01><1F>$ <17> <18> <1A> <18> <1C> <18><1A> <18>
Ar