Skip to content

Commit 6b067ec

Browse files
justinchubyCopilot
andcommitted
Update onnxscript/rewriter/rules/common/_collapse_slices.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0c3bae5 commit 6b067ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxscript/rewriter/rules/common/_collapse_slices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _same_shape(op, data: ir.Value, slice_output: ir.Value, steps: ir.Value, **_
8585
# All steps must be 1
8686
steps_np = _ir_utils.get_numpy_value(steps)
8787
if steps_np is not None:
88-
if not all(s == 1 for s in steps_np.flatten()):
88+
if not all(s == 1 for s in steps_np.flat):
8989
return False
9090
elif not _ir_utils.is_singleton_value(steps, 1):
9191
return False

0 commit comments

Comments
 (0)