有与Matlab函数lhsnorm等效的python吗? [英] Is there a python equivalent to Matlab function lhsnorm?

查看:252
本文介绍了有与Matlab函数lhsnorm等效的python吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从正态分布中获取分层的随机样本.

I am trying to obtain stratified random samples from a normal distribution.

在Matlab上,这就像X = lhsnorm(mu,sigma,n)一样简单

On Matlab this is as simple as X = lhsnorm (mu, sigma, n)

Mathworks文档: https://uk.mathworks.com/help/stats/lhsnorm.html

Mathworks documentation: https://uk.mathworks.com/help/stats/lhsnorm.html

在python中有等效的方法吗?

Is there an equivalent way to do this in python?

推荐答案

使用numpy包并输入:

use numpy package and type:

np.random.normal(mu,sigma,n)

np.random.normal(mu, sigma, n)

这篇关于有与Matlab函数lhsnorm等效的python吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆