import torch
import numpy as np
t = torch.tensor([1, 0, 1, 0])
# t = torch.tensor([[1, 0, 1, 0], [0, 1, 0, 0]])
# t = torch.ones(3, 3, 1)
torch.testing.assert_allclose(torch.nonzero(t), np.argwhere(t.numpy()), rtol=0, atol=0)
torch.testing.assert_allclose(torch.nonzero(t), np.nonzero(t.numpy()), rtol=0, atol=0) # error
cc: @mruberry
cc @mruberry @rgommers @heitorschueroff
cc: @mruberry
cc @mruberry @rgommers @heitorschueroff