dwavesystems / dwavesystems/dwave-optimization
Slicing with 0d ArraySymbol raises TypeError
Open
bug
enhancement
- Dominant language
- C++
- Stars
- 31
- Forks
- 36
- Avg merge
- 16h 55m
- Merged PRs (30d)
- 8
Description
Might be a misunderstanding on my part, but I'd expect the below to work:
```python
from dwave.optimization.mathematical import maximum
from dwave.optimization.model import Model
model = Model()
zero = model.constant(0)
one = model.constant(1)
data = model.constant([1, 1])
max = maximum(zero, one)
data[max:] # works fine if you omit the : here
```
File "dwave/optimization/symbols.pyx", line 604, in dwave.optimization.symbols.BasicIndexing.cppslice
TypeError: 'dwave.optimization.symbols.Maximum' object cannot be interpreted as an integer
Contributor guide
Assessment
This issue has not been assessed yet.