Support non-tuple size
@@ -84,7 +84,7 @@ class RandomState(object):
size = cupy.broadcast(a, b).shape
y = cupy.empty(shape=size, dtype=dtype)
_kernels.beta_kernel(a, b, self.rk_seed, y)
- self.rk_seed += cupy.core.internal.prod(size)
+ self.rk_seed += y.size
return y
def binomial(self, n, p, size=None, dtype=int):
@@ -99,7 +99,7 @@ class RandomState(object):
size = cupy.broadcast(n, p).shape
y = cupy.empty(shape=size, dtype=dtype)
_kernels.binomial_kernel(n, p, self.rk_seed, y)
- self.rk_seed += cupy.core.internal.prod(size)
+ self.rk_seed += y.size
return y
def chisquare(self, df, size=None, dtype=float):
