Quickfix (without
@@ -74,6 +74,8 @@ class RandomState(object):
# * curand.generateNormalDouble
# * curand.generateLogNormal
# * curand.generateLogNormalDouble
+ if size is None:
+ size = () # TODO(kataoka): Remove this after #4615 is merged
size = core.get_size(size)
element_size = functools.reduce(operator.mul, size, 1)
if element_size % 2 == 0:
@@ -576,6 +578,8 @@ class RandomState(object):
def _random_sample_raw(self, size, dtype):
dtype = _check_and_get_dtype(dtype)
+ if size is None:
+ size = () # TODO(kataoka): Remove this after #4615 is merged
out = cupy.empty(size, dtype=dtype)
if dtype.char == 'f':
func = curand.generateUniform
