def mask_and(clip, other_clip):
 if isinstance(other_clip, ImageClip):
  other_clip = other_clip.img
 if isinstance(other_clip, np.ndarray):
  return clip.fl_image((lambda f: np.minimum(f, other_clip)))
 else:
  return clip.fl((lambda gf, t: np.minimum(gf(t), other_clip.get_frame(t))))

def mask_and ( clip , other_clip ) : if isinstance ( other_clip , ImageClip ) : other_clip = other_clip . img if isinstance ( other_clip , np . ndarray ) : return clip . fl_image ( ( lambda f : np . minimum ( f , other_clip ) ) ) else : return clip . fl ( ( lambda gf , t : np . minimum ( gf ( t ) , other_clip . get_frame ( t ) ) ) )
returns the logical and between two masks .