spcl / spcl/dace

Unexpected results when having symbolic shaped arrays and negative indices

Open
#1,086 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
593
Forks
163
Avg merge
2d 23h
Merged PRs (30d)
60

Description

**Describe the bug**
Got unexpected results when having symbolic shaped arrays and negative indices.

**To Reproduce**
```python
import numpy as np
import dace

M = dace.symbol('M')
N = dace.symbol('N')

@dace.program
def test(q:dace.float64[M, N]):
for i in range(0,M):
q[i, 0] = q[-i-1, 1]

test(np.zeros((5, 5)))
print(q)
```

**Expected behavior**
The result matrix (especially first column) should be all zeros.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.