构造随机正交矩阵

import numpy as np
from scipy.stats import ortho_group

d = 3
seed = 1
size = 2
a, b = np.float32(ortho_group.rvs(size=size, dim=d, random_state=seed))
print(a)
print(np.linalg.det(a))
print(a @ a.T)

参考资料

https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ortho_group.html

转载于:https://www.cnblogs.com/weiyinfu/p/10987001.html

你可能感兴趣的:(构造随机正交矩阵)