参考:Python中np.random.multivariate_normal问题?
import numpy as np
from random import choice
def main():
gaussian_offset()
def gaussian_offset():
mean = np.array([0, 0])
cov = np.array([[10, 0], [0, 10]])
dot_num = 3000
f_xy = list(np.random.multivariate_normal(mean, cov, dot_num))
chosen = np.array(choice(f_xy))
print(chosen)
if __name__ == '__main__':
main()