def build_from_index(self, index, paths, dirs):
""" Build index from another index for indices given. """
if isinstance(paths, dict):
self._paths = dict((file, paths[file]) for file in index)
else:
self._paths = dict((file, paths[pos]) for pos, file in np.ndenumerate(index))
self.dirs = dirs
return index
评论列表
文章目录