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

50 lines
3.6 KiB
Plaintext
Raw Normal View History

Ë
†R ãó@ddlmZddlZ ddZddZy)é)Ú annotationsNcóšt|du|du|dug«dkDr td«|dks|dkrtd|d|d«|N|dz
|dz
z}tt|d«|«}|dk(rd}n%||k(rd }nt |«}||kDr|}n
|d|df}|t |t «r|\}}n|x}}tt|d«|dz
«}tt|d«|dz
«}tj|dz
|z «tj|dz
|z «f}|dx} }
nt |t «r|\} }
n|x} }
|
dks| dkr td
«| |
fS) a1Calculate chunk sizes.
Args:
chunk_size (int or tuple(int, int), optional): Chunk size in (y, x) directions, or the same
size in both directions if only one is specified. Cannot be negative.
chunk_count (int or tuple(int, int), optional): Chunk count in (y, x) directions, or the
same count in both directions if only one is specified. If less than 1, set to 1.
total_chunk_count (int, optional): Total number of chunks. If less than 1, set to 1.
ny (int): Number of grid points in y-direction.
nx (int): Number of grid points in x-direction.
Return:
tuple(int, int): Chunk sizes (y_chunk_size, x_chunk_size).
Note:
Zero or one of ``chunk_size``, ``chunk_count`` and ``total_chunk_count`` should be
specified.
zGOnly one of chunk_size, chunk_count and total_chunk_count should be setéz'(ny, nx) must be at least (2, 2), not (z, ú)r)rrzchunk_size cannot be negative) ÚsumÚ
ValueErrorÚminÚmaxÚ two_factorsÚ
isinstanceÚtupleÚmathÚceil) Ú
chunk_sizeÚ chunk_countÚtotal_chunk_countÚnyÚnxÚmax_chunk_countÚfactorsÚ
y_chunk_countÚ
x_chunk_countÚ y_chunk_sizeÚ x_chunk_sizes úR/home/antigravity/intellecton/venv/lib/python3.12/site-packages/contourpy/chunk.pyÚcalc_chunk_sizesrô2 ˆJ˜ " K°tÐ$;Ð=NÐVZÐ=ZÐ \Ð_`ÒÐ ˆA‚va’ÜÐBÀ2À$ÀbÈÈÈAÐИa™4 " Q¡$™-ˆÜ¤Ð$5°qÓ 9¸?ÓØ  Ò ‰JØ
 
‰Jä!Ð"3Ó4ˆBŠwØ% à& q™z¨7°1©:Ð6 àÐÜ k¤5Ô )Ø+6Ñ (ˆM™=à,7Ð 7ˆM˜œC 
¨qÓ1°2°a±4Ó8ˆ
ÜœC 
¨qÓ1°2°a±4Ó8ˆ
Ü—i‘i  A¡¨Ñ 6Ó¿¹ÀBÀqÁDÈMÑCYÓ9ZÐ[ˆ
àÐØ&'Ð'ˆ Ô &Ø%/Ñ"ˆ là&0Ð0ˆ ˜<¨!ÒÐ ˜Ð cóÈ|dkrtd|«tjtj|««}||zdk7r|dz}||zdk7rŒ||z}||kDr||fS||fS)aRSplit an integer into two integer factors.
The two factors will be as close as possible to the sqrt of n, and are returned in decreasing
order. Worst case returns (n, 1).
Args:
n (int): The integer to factorize, must be positive.