提交 9a9401c2 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Minimum requirement is 1.9.1.

上级 1ea11d51
......@@ -356,13 +356,9 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin):
(3, DimShuffle, self.dimshuffle,
numpy.index_exp[..., [0, 2, 3]]),
(1, DimShuffle, self.dimshuffle,
numpy.index_exp[numpy.newaxis, ...])]
# The following test case is not supported by numpy before 1.9
numpy_version = [int(v) for v in numpy.version.version.split('.')[0:2]]
if numpy_version >= [1, 9]:
test_cases.append(
(1, AdvancedSubtensor, self.adv_sub,
numpy.index_exp[..., numpy.newaxis, [1, 2]]))
numpy.index_exp[numpy.newaxis, ...]),
(1, AdvancedSubtensor, self.adv_sub,
numpy.index_exp[..., numpy.newaxis, [1, 2]])]
for length, op_type, op_type_opt, slice_ in test_cases:
numpy_tval = numpy_n[slice_]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论