It appears that np.unique does not quite support objects in all cases:
v = np.array(["abc",None,1,2,3,"3",2])
np.unique(v, return_counts=True)
results in
TypeError: '<' not supported between instances of 'NoneType' and 'str'
I can do np.unique(v.astype(str)) but that would lose the distinction between 3 and "3".
Is that the only way?