dwavesystems / dwavesystems/dwave-optimization
Bad input to the ``broadcast_to`` function triggers an internal-check error
Open
bug
- Dominant language
- C++
- Stars
- 31
- Forks
- 36
- Avg merge
- 16h 55m
- Merged PRs (30d)
- 8
Description
The ``broadcast_to`` below triggers an error
```
>>> broadcast_to(model.constant([[2, 3], [4, 5]]), model.constant(5))
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
```
on the code checking for whether the symbol needs to be reshaped or not: ``if x.shape() == shape or (isinstance(shape, int) and x.shape() == (shape,))``
Contributor guide
Assessment
This issue has not been assessed yet.