U
    a¨+d–  ã                   @   s    d dl ZddlmZ dd„ ZdS )é    Né   )Ú	ImageClipc                    sD   t ˆ tƒrˆ j‰ t ˆ tjƒr.|  ‡ fdd„¡S |  ‡ fdd„¡S dS )zµ Returns the logical 'and' (min) between two masks.
        other_clip can be a mask clip or a picture (np.array).
        The result has the duration of 'clip' (if it has any)
    c                    s   t  | ˆ ¡S ©N)ÚnpÚminimum)Úf©Ú
other_clip© ú=/tmp/pip-unpacked-wheel-0yp4gafk/moviepy/video/fx/mask_and.pyÚ<lambda>   ó    zmask_and.<locals>.<lambda>c                    s   t  | |ƒˆ  |¡¡S r   )r   r   Z	get_frame)ZgfÚtr   r
   r   r      s   
ÿN)Ú
isinstancer   Úimgr   ZndarrayZfl_imageÚfl)Zclipr	   r
   r   r   Úmask_and   s
    
r   )Znumpyr   Z	VideoClipr   r   r
   r
   r
   r   Ú<module>   s   