constructing a python set from a numpy matrix,y = set(x.flatten())