dwavesystems / dwavesystems/dwave-optimization

`AdvancedIndexing` error messages show wrong axis when doing combined indexing

Open
#343 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
31
Forks
36
Avg merge
16h 55m
Merged PRs (30d)
8

Description

```python
>>> i = model.integer((2, 3, 5))
>>> i[1, [10, 2], [3, 4]]
...
IndexError: index's largest possible value 10 is out of bounds for axis 0 with size 3
```

That should show axis 1. This is because the combined indexing splits this operation into two nodes, and the error is coming from the second where `[10, 2]` is the on the first axis.

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.