How to solve the problem – typeerror: unhashable type: ‘numpy.ndarray’? I have the detail here:
above = range(18000, 18060, 5) data = np.loadtxt(open('data.txt'), delimiter=None) energies = (np.hsplit(data, 3)) slice = set(energies)&set(above)
While I run it, I found the warning message:
Traceback (most recent call last): File "<pyshell#27>", line 1, in <module> set(energies)&set(above) TypeError: unhashable type: 'numpy.ndarray
That is my question in my midterm exam, and it is urgent. I searched the solutions on some websites, but I don’t get it. I may miss any line or other changes. I appreciate your assistance!