title: How to use set function with numpy array string?
body: <p>I want to do this in my numpy array of strings</p>
  
  <pre><code>&gt;&gt;&gt; set('Hello world')
  {' ', 'H', 'd', 'e', 'l', 'o', 'r', 'w'}
  </code></pre>
  
  <p>This is what I have done</p>
  
  <pre><code>&gt;&gt;&gt; x=np.array([[' X-ray is dangerous'],['Zebra crosses the road'],['I Love XYZ']])
  
  &gt;&gt;&gt;set(x.flatten())
  {' X-ray is dangerous', 'I Love XYZ', 'Zebra crosses the road'}
  
  &gt;&gt;&gt; np.unique(x)
  array([' X-ray is dangerous', 'I Love XYZ', 'Zebra crosses the road'], 
    dtype='|S22')
  </code></pre>
  
  <p>See its not giving the desired output and I want to get the set values of whole numpy array and not just for the rows. How can I do it?</p>