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