test_sampling_examples.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:smt 作者: SMTorg 项目源码 文件源码
def test_full_factorial(self):
        import numpy as np
        import matplotlib.pyplot as plt

        from smt.sampling import FullFactorial

        xlimits = np.array([
            [0., 4.],
            [0., 3.],
        ])
        sampling = FullFactorial(xlimits=xlimits)

        num = 50
        x = sampling(num)

        print(x.shape)

        plt.plot(x[:, 0], x[:, 1], 'o')
        plt.xlabel('x')
        plt.ylabel('y')
        plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号