a
    Df
                     @  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  st  | \}}t j|t jd}t j|t jd}t ||\}}|d }|d }t g d}t ddgddgdd	gd
dgdd
gg}	t g d}
t |}tt|D ]T}||| t || |	|df  d || |	|df  d   |
| d   7 }q|rjt 	|| 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dtype      ?)r   g      皙?gffffff?皙?皙?g333333?r   g?g      ?r   g?)r   r   r   r   皙?r                 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(   `/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/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)   r1   3   s    
r1   )F)r+   r   )
__future__r   typingr   r   numpyr   Zcontourpy._contourpyr   r*   r1   r(   r(   r(   r)   <module>   s    ) 