def vectorized_is_element(array, choices):
 return vectorize(choices.__contains__, otypes=[bool])(array)

def vectorized_is_element ( array , choices ) : return vectorize ( choices . __contains__ , otypes = [ bool ] ) ( array )
check if each element of array is in choices .