github.com/pytorch/pytorch
  
  
    



Issue: [pytorch] torch.where to support Python scalars 8


	
	opened by vadimkantorov
	on 2018-07-05
	
	
	


a = torch.Tensor([1, 2, 3])
# works, correctly produces tensor([-1., 2., 3.])
b = torch.where(a == 1, torch.Tensor([-1]), a)
# fails: TypeError: where(): argument...