
    fMh
                    R    d dl mZ d dlmZmZ d dlZerd dlmZ 	 dddZ		 dddZ
dS )    )annotations)TYPE_CHECKINGAnyN)CoordinateArrayFshapetuple[int, int]	want_maskboolreturnVtuple[CoordinateArray, CoordinateArray, CoordinateArray | np.ma.MaskedArray[Any, Any]]c           
     n   | \  }}t          j        |t           j                  }t          j        |t           j                  }t          j        ||          \  }}|dz
  }|dz
  }t          j        g d          }t          j        ddgddgdd	gd
dgdd
gg          }	t          j        g d          }
t          j        |          }t          t          |                    D ]T}|||         t          j        ||z  |	|df         z
  dz  ||z  |	|df         z
  dz  z    |
|         dz  z            z  z  }U|rtt          j	        ||z  dz
  dz  dz  ||z  dz
  dz  dz  z   dk     ||z  dz
  dz  dz  ||z  dz
  dz  dz  z   dk               }t           j
                            ||          }|||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``.
    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meshgridasarray
zeros_likerangelenexp
logical_ormaarray)r   r	   nynxxyxscaleyscaleampmidwidthzir   s                 S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/contourpy/util/data.pysimpler3      s    FB
	"BJ'''A
	"BJ'''A;q!DAq#XF#XF *000
1
1C
*sCj3*sDkC:c{S
T
TCJ00011E
aA3s88__ c c	SVBFahQT2Q6!F(SAY:NQR9RRSV[\]V^`aVaabbbb &}hnq 3&!F(S.1)<s)BBcIhnq 4'1V8d?Q*>*EEL
 
 EKKK%%a7N      r   seedintmask_fractionfloatc                   | \  }}t          j        |t           j                  }t          j        |t           j                  }t          j        ||          \  }}t           j                            |          }|                    |           }|dk    rKt          |d          }|                    |           |k     }	t           j        	                    ||	          }|||fS )a  Return random test data in the range 0 to 1.

    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   randomdefault_rnguniformminr%   r&   )
r   r6   r8   r'   r(   r)   r*   rngr0   r   s
             r2   r<   r<   3   s     FB
	"BJ'''A
	"BJ'''A;q!DAq
)


%
%CAsM400{{{&&6EKKK%%a7Nr4   )F)r   r   r	   r
   r   r   )r5   r   )r   r   r6   r7   r8   r9   r   r   )
__future__r   typingr   r   numpyr   contourpy._contourpyr   r3   r<    r4   r2   <module>rF      s    " " " " " " % % % % % % % %     5444444 /4% % % % %R FI      r4   