提交 513c676a authored 作者: rpgoldman's avatar rpgoldman 提交者: Robert P. Goldman

Fix deprecation warning.

Change the import of `Iterable` from `collections.Iterable` to `collections.abc.Iterable` to future-proof against Python 3.7.8.
上级 42d874ef
...@@ -465,7 +465,7 @@ class _tensor_py_operators(object): ...@@ -465,7 +465,7 @@ class _tensor_py_operators(object):
(hasattr(args_el, 'dtype') and args_el.dtype == 'bool')): (hasattr(args_el, 'dtype') and args_el.dtype == 'bool')):
return True return True
if (not isinstance(args_el, theano.tensor.Variable) and if (not isinstance(args_el, theano.tensor.Variable) and
isinstance(args_el, collections.Iterable)): isinstance(args_el, collections.abc.Iterable)):
for el in args_el: for el in args_el:
if includes_bool(el): if includes_bool(el):
return True return True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论