dwavesystems / dwave-optimization

Enables the formulation of nonlinear models for industrial optimization problems.
https://docs.ocean.dwavesys.com/en/stable/docs_optimization/index.html#index-optimization
Apache License 2.0
7 stars 18 forks source link

Fix two bugs in advanced indexing propagation for non-const non-dynamic arrays with dynamic indexers #138

Closed wbernoudy closed 1 month ago

wbernoudy commented 1 month ago

First one was just a simple logic error in which method should be called when reverting the reverse offset map. Second one was basically covered by an old TODO: to ensure all updates to the parent array are reflected in the final advanced indexing output, we need to track the offset indices that were modified (not just the offsets themselves) as new offsets may be added that duplicate previous unchanged offsets.

arcondello commented 1 month ago

Also needs a release note :slightly_smiling_face: