提交 335ca1e6 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Ricardo Vieira

Fix RUF007 (itertools.pairwise)

上级 79ff97a5
import itertools
import sys import sys
from collections.abc import Iterable from collections.abc import Iterable
...@@ -1700,7 +1701,7 @@ def local_join_subtensors(fgraph, node): ...@@ -1700,7 +1701,7 @@ def local_join_subtensors(fgraph, node):
return return
for subtensor1_idx, (subtensor1, subtensor2) in enumerate( for subtensor1_idx, (subtensor1, subtensor2) in enumerate(
zip(tensors[:-1], tensors[1:]) itertools.pairwise(tensors)
): ):
# Check that two consecutive Subtensors are operating on the same base tensor # Check that two consecutive Subtensors are operating on the same base tensor
if not ( if not (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论