v = torch.arange(4) u = v.unsqueeze(0) print(u.data_ptr() == v.data_ptr()) # True print(u.stride()) # (4, 1)