'Elementwise regex match.
Parameters
pattern : str or compiled regex
Returns
matches : np.ndarray[bool]
An array with the same shape as self indicating whether each
element of self was matched by ``pattern``.'

@preprocess(pattern=coerce(from_=(bytes, unicode), to=re.compile))
def matches(self, pattern):

    return self.map_predicate(compose(bool, pattern.match))
