title: Finding unique values in each row
body: <p>I have an array with strings of size of 2 and want to get unique strings in each row.</p>
  <pre><code>np.__version__
  # '1.19.2'
  arr = np.array([['Z7', 'Q4', 'Q4'], # 2 unique strings
                  ['Q4', 'Z7', 'Q4'], # 2 unq strings
                  ['Q4', 'Z7', 'Z7'], # 2 unq strings
                  ['Z7', 'Z7', 'Q4'], # 2 unq strings
                  ['D8', 'D8', 'L1'], # 2 unq strings
                  ['L1', 'L1', 'D8']], dtype='&lt;U2') # 2 unq strings
  </code></pre>
  <p>It is guaranteed that every row contains the same number of uniques strings i.e. every row will have the same number of unique strings in my case it's 2.</p>
  <p><strong>Expected output</strong>:</p>
  <pre><code>array([['Q4', 'Z7'],
         ['Q4', 'Z7'],
         ['Q4', 'Z7'],
         ['Q4', 'Z7'],
         ['D8', 'L1'],
         ['D8', 'L1']], dtype='&lt;U2')
  </code></pre>
  <p>Here, each row is sorted but it's doesn't have to be. It's fine both ways.</p>
  <h3>My code:</h3>
  <pre><code>np.apply_along_axis(np.unique, 1, arr)
  
  # array([['Q4', 'Z7'],
  #        ['Q4', 'Z7'],
  #        ['Q4', 'Z7'],
  #        ['Q4', 'Z7'],
  #        ['D8', 'L1'],
  #        ['D8', 'L1']], dtype='&lt;U2')
  </code></pre>
  <p>I thought <code>np.unique</code> over axis 1 would give expected results but</p>
  <pre><code>np.unique(arr, axis=1)
  # array([['Q4', 'Q4', 'Z7'],
  #        ['Q4', 'Z7', 'Q4'],
  #        ['Z7', 'Z7', 'Q4'],
  #        ['Q4', 'Z7', 'Z7'],
  #        ['L1', 'D8', 'D8'],
  #        ['D8', 'L1', 'L1']], dtype='&lt;U2')
  </code></pre>
  <p>I couldn't understand what exactly happened and why it returned this exact output.</p>