提交 0d82fe2e authored 作者: Samira Shabanian's avatar Samira Shabanian

change shape dimensions int32 to int64

上级 2d750998
...@@ -520,12 +520,7 @@ def binomial(random_state, size=None, n=1, p=0.5, ndim=None, ...@@ -520,12 +520,7 @@ def binomial(random_state, size=None, n=1, p=0.5, ndim=None,
n = tensor.as_tensor_variable(n) n = tensor.as_tensor_variable(n)
p = tensor.as_tensor_variable(p) p = tensor.as_tensor_variable(p)
ndim, size, bcast = _infer_ndim_bcast(ndim, size, n, p) ndim, size, bcast = _infer_ndim_bcast(ndim, size, n, p)
#if n.dtype == 'int64':
# THIS WORKS AROUND A NUMPY BUG on 32bit machine # THIS WORKS AROUND A NUMPY BUG on 32bit machine
# Erase when the following works on a 32bit machine:
# numpy.random.binomial(
# n=numpy.asarray([2,3,4], dtype='int64'),
# p=numpy.asarray([.1, .2, .3], dtype='float64'))
n = tensor.cast(n, 'int64') n = tensor.cast(n, 'int64')
op = RandomFunction('binomial', op = RandomFunction('binomial',
tensor.TensorType(dtype=dtype, tensor.TensorType(dtype=dtype,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论