Mersenne Twister在Python中的开源实现? [英] Open-source implementation of Mersenne Twister in Python?

查看:87
本文介绍了Mersenne Twister在Python中的开源实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python中是否可以使用Mersenne Twister和其他良好的随机数生成器实现良好的开源实现?我想用于数学和自然科学专业的教学吗?我也在寻找相应的理论支持.

Is there any good open-source implementation of Mersenne Twister and other good random number generators in Python available? I would like to use in for teaching math and comp sci majors? I am also looking for the corresponding theoretical support.

Mersenne Twister的源代码可以很多种语言(例如C(random.py)或伪代码(Wikipedia))获得,但是我在Python中找不到.

Source code of Mersenne Twister is readily available in various languages such as C (random.py) or pseudocode (Wikipedia) but I could not find one in Python.

推荐答案

Mersenne Twister 是标准python库所使用的实现.您可以在python发行版的random.py文件中看到它.

Mersenne Twister is an implementation that is used by standard python library. You can see it in random.py file in your python distribution.

在我的系统(Ubuntu 9.10)上它位于/usr/lib/python2.6中,在Windows上它应该位于C:\Python26\Lib

On my system (Ubuntu 9.10) it is in /usr/lib/python2.6, on Windows it should be in C:\Python26\Lib

这篇关于Mersenne Twister在Python中的开源实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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