Np.pi equivalent in Pytorch

Hi! Just stumbled across this. Why would you do this instead of torch.tensor(math.pi). Is it because OP said “built-in”? Is there any other practical advantage to your approach?

3 Likes