提交 b353d555 authored 作者: Frederic Bastien's avatar Frederic Bastien

Change MRG choice default of a to be None. We can do this as in the old…

Change MRG choice default of a to be None. We can do this as in the old back-end, when a wasn't provided and pvals was, a=2, but it was only valid when that match pvals shapes. So it was duplicate information. As MRG have pvals mandatory, to work it need a matching value for a.
上级 37e2a9ec
......@@ -1446,7 +1446,7 @@ class MRG_RandomStreams(object):
raise NotImplementedError(("MRG_RandomStreams.multinomial only"
" implemented for pvals.ndim = 2"))
def choice(self, size=1, a=2, replace=True, p=None, ndim=None,
def choice(self, size=1, a=None, replace=True, p=None, ndim=None,
dtype='int64', nstreams=None):
"""
Sample `size` times from a multinomial distribution defined by
......@@ -1458,7 +1458,7 @@ class MRG_RandomStreams(object):
----------
size: integer or integer tensor (default 1)
The number of samples. It should be between 1 and `p.shape[1]-1`.
a: int or None (default 2)
a: int or None (default None)
For now, a should be None. This function will sample
values between 0 and `p.shape[1]-1`. When a != None will be
implemented, if `a` is a scalar, the samples are drawn from the
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论