In the code:
import numpy as np
array_3_sets = np.repeat(set(), 3)
print(array_3_sets)
array_3_sets[0].add(0)
array_3_sets[1].add(1)
print(array_3_sets)
I get this output:
[set() set() set()]
[{0, 1} {0, 1} {0, 1}]
Instead of getting:
[set() set() set()]
[{0} {1} set()]
as I would expect. When I add an element to one of the three sets, it is added to all of them, as if the three sets were one same set. I can't understand why this happens.