y 01 import torch 02 03 a = torch.tensor((1, 2, 3), device='cuda') 04 b = torch.tensor((4, 5, 6), device='cuda') 05 torch.add(a, b) >> tensor([5, 7, 9]) 06 t = torch.randn(2, 2, dtype=torch.complex128, device='cuda') 07 pd = torch.matmul(t, t.T.conj()) 08 l = torch.linalg.cholesky(pd) >> tensor( [[0.4893+0.0000j, 0.0000+0.0000j], [0.4194+0.0995j, 1.3453+0.0000j]], device='cuda:0', dtype=torch.complex128) 01 import numpy as np 02 03 a = np.array((1, 2, 3)) 04 b = np.array((4, 5, 6)) 05 np.add(a, b) >> array([5, 7, 9]) 06 a = t.cpu().numpy() 07 pd = np.matmul(a, a.T.conj()) 08 l = np.linalg.cholesky(pd) >> array( [[0.48927494+0.j, 0.+0.j], [0.41939711+0.0994527j, 1.34532112+0.j]])