I am new to python and I am trying to index a bunch of pcd files(each file is essentially an n*3 array) by matching them with their classtype. certain file is class 1, 2, 3 and so on. WHen i try to run it I am getting an unhashable numpy.ndarrayerror. Since I have a row of files that I need to load and index, how should I proceed?
path= glob.glob("path/to/pcd/folder/*.pcd")
data_dict=dict()
for i in range(len(list(path):
currentPath = path[i]
classtype=currentPath[-5:]
classtype=classtype[0]
p = pcl.load(path[i])
a = np.asarray(p)
data_dict[a]=classtype
”Object”:awhich is to say the key is obeject and the value is a. If you want to get a you should dodict[“Object”]rather thandict[a]