U
    i2e
                     @  sb   d dl mZ d dlmZmZ d dlZer4d dlmZ ddddd	d
dZ	ddddddddZ
dS )    )annotations)TYPE_CHECKINGAnyN)CoordinateArrayFztuple[int, int]boolzVtuple[CoordinateArray, CoordinateArray, CoordinateArray | np.ma.MaskedArray[Any, Any]])shape	want_maskreturnc              
   C  s  | \}}t j|t jd}t j|t jd}t ||\}}|d }|d }t dddddg}t ddgd	dgd
dgdd	gddgg}	t dddddg}
t |}tt|D ]T}||| t || |	|df  d || |	|df  d   |
| d   7 }q|rvt 	|| d d d || d d d  dk || d d d || d d d  dk }t j
j||d}|||fS )ai  Return simple test data consisting of the sum of two gaussians.

    Args:
        shape (tuple(int, int)): 2D shape of data to return.
        want_mask (bool, optional): Whether test data should be masked or not, default ``False``.

    Return:
        Tuple of 3 arrays: ``x``, ``y``, ``z`` test data, ``z`` will be masked if
        ``want_mask=True``.
    Zdtypeg      ?g      g?ggffffff?g?g?g333333?g?g      ?g?g?r                 g{Gz?g?g{Gz?mask)nparangefloat64meshgridZasarrayZ
zeros_likerangelenexp
logical_ormaarray)r   r   nynxxyZxscaleZyscaleampZmidwidthzir    r"   7/tmp/pip-unpacked-wheel-_24pu9r8/contourpy/util/data.pysimple   s&    (
R**r$     r   intfloat)r   seedmask_fractionr	   c           
      C  s   | \}}t j|t jd}t j|t jd}t ||\}}t j|}|j| d}|dkrt|d}|j| d|k }	t jj	||	d}|||fS )a  Return random test data..

    Args:
        shape (tuple(int, int)): 2D shape of data to return.
        seed (int, optional): Seed for random number generator, default 2187.
        mask_fraction (float, optional): Fraction of elements to mask, default 0.

    Return:
        Tuple of 3 arrays: ``x``, ``y``, ``z`` test data, ``z`` will be masked if
        ``mask_fraction`` is greater than zero.
    r
   )sizer   gGz?r   )
r   r   r   r   randomZdefault_rnguniformminr   r   )
r   r(   r)   r   r   r   r   rngr    r   r"   r"   r#   r+   3   s    
r+   )F)r%   r   )
__future__r   typingr   r   Znumpyr   Zcontourpy._contourpyr   r$   r+   r"   r"   r"   r#   <module>   s    )   