title: How to turn Numpy array to set efficiently?
body: <p>I used:  </p>
  
  <pre><code>df['ids'] = df['ids'].values.astype(set)
  </code></pre>
  
  <p>to turn <code>lists</code> into <code>sets</code>, but the output was a list not a set:  </p>
  
  <pre><code>&gt;&gt;&gt; x = np.array([[1, 2, 2.5],[12,35,12]])
  
  &gt;&gt;&gt; x.astype(set)
  array([[1.0, 2.0, 2.5],
         [12.0, 35.0, 12.0]], dtype=object)
  </code></pre>
  
  <p>Is there an efficient way to turn list into set in <code>Numpy</code>?  </p>
  
  <p><strong>EDIT 1:</strong><br>
  My input is as big as below:<br>
  I have 3,000 records. Each has 30,000 ids: [[1,...,12,13,...,30000], [1,..,43,45,...,30000],...,[...]]</p>