Skip to content

Commit

Permalink
At least make sure that indices is a falsy value.
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyai committed Oct 21, 2024
1 parent febc1a6 commit 9c52064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dace/subsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def offset_by(self, off: Collection, negative: bool):
return Indices([self.indices[i] + mult * off for i, off in enumerate(off)])

def offset_new(self, other, negative, indices=None):
assert indices is None
assert not indices
if not isinstance(other, Subset):
if isinstance(other, (list, tuple)):
other = Indices(other)
Expand Down
2 changes: 1 addition & 1 deletion tests/python_frontend/nested_name_accesses_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def test_access_to_nested_transient_dappy():
KLON = 4
NBLOCKS = 5

@dc.program
@dc.program(auto_optimize=False)
def small_wip_dappy(inp: dc.float64[KLEV+1, KLON, NBLOCKS], out: dc.float64[KLEV, KLON, NBLOCKS]):
for jn in dc.map[0:NBLOCKS]:
tmp = np.zeros([KLEV+1, KLON])
Expand Down

0 comments on commit 9c52064

Please sign in to comment.