How can I determine if a Numpy array contains a string? The array a in
a = np.array('hi world')
has data type dtype('|S8'), where 8 refers to the number of characters in the string.
I don't see how regular expressions (such as re.match('\|S\d+', a.dtype)) would work here as the data type isn't simply '|S8'.