提交 ee8089db authored 作者: Benjamin Scellier's avatar Benjamin Scellier 提交者: Benjamin Scellier

delete case numpy.__version__ <= '1.6.1'

上级 8e548628
...@@ -1418,16 +1418,6 @@ class CAReduce(Op): ...@@ -1418,16 +1418,6 @@ class CAReduce(Op):
"Input (%s) has zero-size on axis %s, but " "Input (%s) has zero-size on axis %s, but "
"self.scalar_op (%s) has no attribute 'identity'" "self.scalar_op (%s) has no attribute 'identity'"
% (variable, dimension, self.scalar_op))) % (variable, dimension, self.scalar_op)))
else:
# Numpy 1.6 has a bug where you sometimes have to specify
# "dtype='object'" in reduce for it to work, if the ufunc
# was built with "frompyfunc". We need to find out if we
# are in one of these cases (only "object" is supported in
# the output).
if ((self.ufunc.ntypes == 1) and
(self.ufunc.types[0][-1] == 'O')):
variable = self.ufunc.reduce(variable, dimension,
dtype='object')
else: else:
variable = self.ufunc.reduce(variable, dimension, variable = self.ufunc.reduce(variable, dimension,
dtype=acc_dtype) dtype=acc_dtype)
......
...@@ -2295,15 +2295,6 @@ class AdvancedIncSubtensor(Op): ...@@ -2295,15 +2295,6 @@ class AdvancedIncSubtensor(Op):
'You may need to clear the cache (theano-cache clear) ' 'You may need to clear the cache (theano-cache clear) '
'afterwards.') 'afterwards.')
if (numpy.__version__ <= '1.6.1' and
out[0].size != numpy.uint32(out[0].size)):
warnings.warn(
'Numpy versions 1.6.1 and below have a bug preventing '
'advanced indexing from correctly filling arrays that '
'are too big (>= 2^32 elements). It is possible that '
'out[0] (%s), with shape %s, is not correctly filled.'
% (out[0], out[0].shape))
def infer_shape(self, node, ishapes): def infer_shape(self, node, ishapes):
return [ishapes[0]] return [ishapes[0]]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论