提交 3903e59f authored 作者: James Bergstra's avatar James Bergstra

rng_mrg - renamed 'prob' parameter of .binomial to 'p'

上级 1cfa8fbc
......@@ -645,9 +645,9 @@ class MRG_RandomStreams(object):
raise NotImplementedError( 'Increase the size to match the broadcasting pattern of `low` and `high` arguments')
return r
def binomial(self, size=None, n=1, prob=0.5, ndim=None, dtype='int64'):
def binomial(self, size=None, n=1, p=0.5, ndim=None, dtype='int64'):
if n == 1:
return cast(self.uniform(size=size) < prob, dtype)
return cast(self.uniform(size=size) < p, dtype)
else:
raise NotImplementedError("MRG_RandomStreams.binomial with n > 1")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论