I'm trying to use numpy's unique function. I'm seeing something strange:
import numpy as np
test = [{"a"}, {"b"}, {"b"}, {"a"}]
print(test)
# [{'a'}, {'b'}, {'b'}, {'a'}]
u = np.unique(test)
print(u)
# [{'a'} {'b'} {'a'}]
print(u[0] == u[2])
# True
Why is it not removing the duplicate "a", like it did for "b"? It seems to be whichever is in the first position does not get removed. What am I missing? It feels like a bug but I can't find anything online. I'm using numpy==1.19.4 on Ubuntu 20.04. I tried 1.19.5 (latest) but it still behaved this way.