particle_type = self.particle_type[window["type"]: window["type"] + size].copy()
particle_type = torch.from_numpy(np.asarray(particle_type))
In the following code snippet I am having following error
Cell In[9], line 43, in OneStepDataset.get(self, idx)
41 size = window["size"]
42 particle_type = self.particle_type[window["type"]: window["type"] + size].copy()
---> 43 particle_type = torch.from_numpy(np.asarray(particle_type))
44 position_seq = self.position[window["pos"]: window["pos"] + self.window_length * size * self.dim].copy()
45 position_seq.resize(self.window_length, size, self.dim)
TypeError: expected np.ndarray (got numpy.ndarray)
I tried type casting to array and without array, nothing works.
Can anyone suggest any idea?
Link to the full notebook