For Numpy and Tensor,
choose = [1,4,6]
array_after_choose = array[choose]
tensor_after_choose = tensor[choose]
array_after_choose = array[choose]
tensor_after_choose = tensor[choose]
For List, cannot put a list into a list
choose = [1,4,6]
list_after_choose = list(list_temp[i] for i in choose)
list_after_choose = list(list_temp[i] for i in choose)
No comments:
Post a Comment