-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
todoNot as important as medium or high priority tasks, but we will work on these.Not as important as medium or high priority tasks, but we will work on these.
Description
Currently, "the only supported types to index a tensor are integers, slices and torch.ByteTensor". Would it be possible to add numpy arrays as well, especially in the case where they contain only one element? For instance, this code will raise an error:
a = torch.FloatTensor(3).normal_()
i = np.int32([2, 0, 1])
a[i[0]]And requires to do a[int(i[0])] instead.
szagoruyko, apaszke and asanakoy
Metadata
Metadata
Assignees
Labels
todoNot as important as medium or high priority tasks, but we will work on these.Not as important as medium or high priority tasks, but we will work on these.