我正在尝试使用Scipy进行正交向量计算:
import numpy as np
from scipy import linalg
e1 = np.float16([-0.913, -0.4072]).reshape(2,1)
e2 = linalg.orth(e1)
print(f'e_1 {e1} ,'
f' ortogonal e2 is {e2}')
我期望的输出是:
e2 is [[-0.4072] [0.913]]
我检查了一下,通过:0.913 * -0.4072 + (-0.4072)*0.913 = 0
但是收到:
e2 is [[-0.913] [-0.4072 ]]
我做错了什么?