
    h7.                       % S SK Jr  S SKJr  S SKrS SKJrJrJ	r	J
r
JrJrJrJrJr  S SKJr  S SKJr  S SKJrJrJrJr  S SKJrJrJrJr  S S	KJrJ r J!r!  \(       a  S S
KJ"r"  S SK#J$r$  SSK%J&r&J'r'  / SQr(\
\\\S.r)S\*S'       SS jr+   SSSSSSSSS\RX                  S S.
                           SS jjjr-g)    )annotations)TYPE_CHECKINGN)	ContourGeneratorFillTypeLineTypeMpl2005ContourGeneratorMpl2014ContourGeneratorSerialContourGeneratorThreadedContourGeneratorZInterpmax_threads)__version__)calc_chunk_sizes)convert_filledconvert_linesconvert_multi_filledconvert_multi_lines)dechunk_filleddechunk_linesdechunk_multi_filleddechunk_multi_lines)as_fill_typeas_line_typeas_z_interp)Any)	ArrayLike   )CoordinateArray	MaskArray)r   contour_generatorr   r   r   r   r   r   r   r   r   r   r   r   r   r	   r
   r   r   )mpl2005mpl2014serialthreadedz!dict[str, type[ContourGenerator]]_class_lookupc                d   [         R                  R                  U [         R                  S9n[         R                  R	                  USS9n[         R                  R                  U5      (       a   [         R                  R                  U5      nOS n[         R                  R                  U5      U4$ )NdtypeF)copy)npmaasarrayfloat64masked_invalid	is_maskedgetmaskgetdata)zz_arrayz_maskedmasks       D/var/www/html/env/lib/python3.13/site-packages/contourpy/__init__.py_remove_z_maskr7   I   sy     eemmARZZm0Guu##G%#8H	uux  uu}}X&55=="D((    r#   F)
namecorner_mask	line_type	fill_type
chunk_sizechunk_counttotal_chunk_countquad_as_triz_interpthread_countc       
        	   [         R                  " U [         R                  S9n [         R                  " U[         R                  S9n[        U5      u  p-UR                  S:w  a  [        SUR                   S35      eUR                  S   S:  d  UR                  S   S:  a  [        SUR                   35      eUR                  u  pU R                  UR                  :w  a&  [        SU R                   S	UR                   S
35      eU R                  S:X  a`  [         R                  " U[         R                  S9n [         R                  " U[         R                  S9n[         R                  " X5      u  pGO'U R                  S:X  am  [        U 5      U:w  a  [        S[        U 5       SU S35      e[        U5      U:w  a  [        S[        U5       SU S35      e[         R                  " X5      u  pOU R                  S:X  a  U R                  UR                  :w  a&  [        SU R                   SUR                   S35      eUR                  UR                  :w  a&  [        SUR                   SUR                   S35      eO[        SU R                   S35      eUb%  UR                  UR                  :w  a  [        S5      eU[        ;  a  [        SU 35      e[        XxXU5      u  nn[        U   nUc  UR                  5       nO*U(       a#  UR                  5       (       d  [        U S35      eUc  UR                  nO[        U5      nUR!                  U5      (       d  [        U SU 35      eUc  UR"                  nO[%        U5      nUR'                  U5      (       d  [        U SU 35      eU
(       a#  UR)                  5       (       d  [        U S35      eUc  [*        R,                  nO[/        U5      nU[*        R,                  :w  a%  UR1                  5       (       d  [        U SU 35      eUS;  a%  UR3                  5       (       d  [        U SU 35      eXX-/nUUS.nUS;  a
  UUS '   UUS!'   UR                  5       (       a  UUS"'   UR)                  5       (       a  U
US#'   UR1                  5       (       a  UUS$'   UR3                  5       (       a  UUS%'   U" U0 UD6$ )&a  Create and return a :class:`~.ContourGenerator` object.

The class and properties of the returned :class:`~.ContourGenerator` are determined by the
function arguments, with sensible defaults.

Args:
    x (array-like of shape (ny, nx) or (nx,), optional): The x-coordinates of the ``z`` values.
        May be 2D with the same shape as ``z.shape``, or 1D with length ``nx = z.shape[1]``.
        If not specified are assumed to be ``np.arange(nx)``. Must be ordered monotonically.
    y (array-like of shape (ny, nx) or (ny,), optional): The y-coordinates of the ``z`` values.
        May be 2D with the same shape as ``z.shape``, or 1D with length ``ny = z.shape[0]``.
        If not specified are assumed to be ``np.arange(ny)``. Must be ordered monotonically.
    z (array-like of shape (ny, nx), may be a masked array): The 2D gridded values to calculate
        the contours of.  May be a masked array, and any invalid values (``np.inf`` or
        ``np.nan``) will also be masked out.
    name (str): Algorithm name, one of ``"serial"``, ``"threaded"``, ``"mpl2005"`` or
        ``"mpl2014"``, default ``"serial"``.
    corner_mask (bool, optional): Enable/disable corner masking, which only has an effect if
        ``z`` is a masked array. If ``False``, any quad touching a masked point is masked out.
        If ``True``, only the triangular corners of quads nearest these points are always masked
        out, other triangular corners comprising three unmasked points are contoured as usual.
        If not specified, uses the default provided by the algorithm ``name``.
    line_type (LineType or str, optional): The format of contour line data returned from calls
        to :meth:`~.ContourGenerator.lines`, specified either as a :class:`~.LineType` or its
        string equivalent such as ``"SeparateCode"``.
        If not specified, uses the default provided by the algorithm ``name``.
        The relationship between the :class:`~.LineType` enum and the data format returned from
        :meth:`~.ContourGenerator.lines` is explained at :ref:`line_type`.
    fill_type (FillType or str, optional): The format of filled contour data returned from calls
        to :meth:`~.ContourGenerator.filled`, specified either as a :class:`~.FillType` or its
        string equivalent such as ``"OuterOffset"``.
        If not specified, uses the default provided by the algorithm ``name``.
        The relationship between the :class:`~.FillType` enum and the data format returned from
        :meth:`~.ContourGenerator.filled` is explained at :ref:`fill_type`.
    chunk_size (int or tuple(int, int), optional): Chunk size in (y, x) directions, or the same
        size in both directions if only one value is specified.
    chunk_count (int or tuple(int, int), optional): Chunk count in (y, x) directions, or the
        same count in both directions if only one value is specified.
    total_chunk_count (int, optional): Total number of chunks.
    quad_as_tri (bool): Enable/disable treating quads as 4 triangles, default ``False``.
        If ``False``, a contour line within a quad is a straight line between points on two of
        its edges. If ``True``, each full quad is divided into 4 triangles using a virtual point
        at the centre (mean x, y of the corner points) and a contour line is piecewise linear
        within those triangles. Corner-masked triangles are not affected by this setting, only
        full unmasked quads.
    z_interp (ZInterp or str, optional): How to interpolate ``z`` values when determining where
        contour lines intersect the edges of quads and the ``z`` values of the central points of
        quads, specified either as a :class:`~contourpy.ZInterp` or its string equivalent such
        as ``"Log"``. Default is ``ZInterp.Linear``.
    thread_count (int): Number of threads to use for contour calculation, default 0. Threads can
        only be used with an algorithm ``name`` that supports threads (currently only
        ``name="threaded"``) and there must be at least the same number of chunks as threads.
        If ``thread_count=0`` and ``name="threaded"`` then it uses the maximum number of threads
        as determined by the C++11 call ``std::thread::hardware_concurrency()``. If ``name`` is
        something other than ``"threaded"`` then the ``thread_count`` will be set to ``1``.

Return:
    :class:`~.ContourGenerator`.

Note:
    A maximum of one of ``chunk_size``, ``chunk_count`` and ``total_chunk_count`` may be
    specified.

Warning:
    The ``name="mpl2005"`` algorithm does not implement chunking for contour lines.
r'      zInput z must be 2D, not Dr   r   z>Input z must be at least a (2, 2) shaped array, but has shape zNumber of dimensions of x (z	) and y (z) do not matchzLength of x (z%) must match number of columns in z ()zLength of y (z") must match number of rows in z (zShapes of x z and z z do not matchzShapes of y z+Inputs x and y must be None, 1D or 2D, not z=If mask is set it must be a 2D array with the same shape as zz%Unrecognised contour generator name: z4 contour generator does not support corner_mask=Truez. contour generator does not support line_type z. contour generator does not support fill_type z4 contour generator does not support quad_as_tri=Truez- contour generator does not support z_interp )r   r   z1 contour generator does not support thread_count )x_chunk_sizey_chunk_size)r!   r"   r;   r<   r:   r@   rA   rB   )r*   r,   r-   r7   ndim	TypeErrorshapearangemeshgridlen
ValueErrorr%   r   supports_corner_maskdefault_line_typer   supports_line_typedefault_fill_typer   supports_fill_typesupports_quad_as_trir   Linearr   supports_z_interpsupports_threads)xyr2   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   r5   nynxrH   rG   clsargskwargss                        r6   r    r    X   s   d 	

1BJJ'A


1BJJ'AQGA 	vv{2166(!<==wwqzA~aXYZY`Y`XabccWWFB 	vv5affXYqvvhn]^^vv{IIb

+IIb

+{{1 1	
1q6R<mCF83XY[X\\]^__q6R<mCF83UVXUYYZ[\\{{1 1	
177aggl177)7177)=QRR77aggl177)7177)=QRR  EaffXQOPP DJJ!''1XYY = @GHH "2!2"<L, 
C ..0	S5577D6!UVWW ))	 +	!!),,D6!OPY{[\\ ))	 +	!!),,D6!OPY{[\\ 33355D6!UVWW >>x(7>>!#*?*?*A*AD6!NxjYZZ 6!#*>*>*@*@D6!RS_R`abb !?D$$EF
 ))'{'{
!! +}
!! +}
%z
!-~ r8   )r2   .ArrayLike | np.ma.MaskedArray[Any, Any] | Nonereturnz(tuple[CoordinateArray, MaskArray | None])NNN)rY   ArrayLike | NonerZ   rb   r2   r`   r9   strr:   zbool | Noner;   zLineType | str | Noner<   zFillType | str | Noner=   int | tuple[int, int] | Noner>   rd   r?   z
int | Noner@   boolrA   zZInterp | str | NonerB   intra   r   ).
__future__r   typingr   numpyr*   contourpy._contourpyr   r   r   r   r	   r
   r   r   r   contourpy._versionr   contourpy.chunkr   contourpy.convertr   r   r   r   contourpy.dechunkr   r   r   r   contourpy.enum_utilr   r   r   r   numpy.typingr   
_contourpyr   r   __all__r%   __annotations__r7   rV   r     r8   r6   <module>ru      sX   "   
 
 
 + ,   H G&62 '&$(	40 )5)-)  8<E 
 #'+'+/304$(%,^^E E E  6E 
 E  E  %E  %E  -E  .E  "E  E  #E  E  E r8   