How is numpy.random.Generator different from RandomState?

折月煮酒 提交于 2021-01-04 03:30:50

问题


Generator sounds like a replacement for RandomState, and the way of the future for generating random numbers in NumPy.

What features or behavior (currently or planned) does Generator have that RandomState doesn't?

Both can be parameterized with BitGenerator objects. They have some different methods, but the vast majority appear to be the same.

Relevant links:

  • docs on the "legacy" RandomState
  • Generator docs
  • BitGenerator docs
  • Developer's github

来源:https://stackoverflow.com/questions/61352259/how-is-numpy-random-generator-different-from-randomstate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!