Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Support tuples that are combinations of integer vars and literals.
  • Loading branch information
DrTodd13 committed Sep 17, 2021
commit c3406ce834a834e7e9df732cab80c7cc5dc5d310
4 changes: 2 additions & 2 deletions numba/parfors/array_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ def _analyze_inst(self, label, scope, equiv_set, inst, redefined):
shape = inst.value
elif (
Comment thread
DrTodd13 marked this conversation as resolved.
Resolved
isinstance(typ, types.containers.Tuple)
and all([isinstance(x, (types.IntegerLiteral)) for x in typ.types])
and all([isinstance(x, (types.Integer, types.IntegerLiteral)) for x in typ.types])
):
shape = inst.value

Expand Down Expand Up @@ -1392,7 +1392,7 @@ def _analyze_inst(self, label, scope, equiv_set, inst, redefined):
)
elif (
Comment thread
DrTodd13 marked this conversation as resolved.
Resolved
isinstance(typ, types.containers.Tuple)
and all([isinstance(x, (types.IntegerLiteral)) for x in typ.types])
and all([isinstance(x, (types.Integer, types.IntegerLiteral)) for x in typ.types])
):
shape = self._gen_shape_call(
equiv_set, lhs, len(typ), shape, post
Expand Down