Dr *_*ius 4 f# normal-distribution
如何从F#中的指定正态分布中获取随机值?
我想要类似于Python的x = numpy.random.normal(mean,standard_deviation),但是在F#中.
小智 5
例如,您可以使用Math.NET Numerics库.
open MathNet.Numerics.Distributions
let normalDist = new Normal(mean, stddev)
normalDist.Sample()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
350 次 |
| 最近记录: |