Commit 42d124c
authored
Fix xview assignment through leading newaxis slices (#2896)
# Checklist
- [x] The title and commit message(s) are descriptive.
- [x] Small commits made to fix your PR have been squashed to avoid
history pollution.
- [x] Tests have been added for new features or bug fixes.
- [x] API of new functions and classes are documented.
# Description
This PR fixes incorrect index mapping in xview assignments when a view
starts with one or more newaxis() slices.
The change updates the index computation to use a newaxis-aware slice
index before applying integral-slice adjustments. That keeps writes
through views with multiple leading newaxis() entries aligned with the
correct element in the underlying tensor.
Co-authored-by: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com>1 parent 68f9a77 commit 42d124c
2 files changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
1649 | | - | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1650 | 1651 | | |
1651 | 1652 | | |
1652 | 1653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1591 | 1591 | | |
1592 | 1592 | | |
1593 | 1593 | | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1594 | 1633 | | |
1595 | 1634 | | |
1596 | 1635 | | |
| |||
0 commit comments