Commit b60d75a
Fix Nx.gather error message for scalar indices
Nx.gather(tensor, scalar) gave an unhelpful Erlang error because
indexed_axes tried to access elem({}, -1) before the shape validation
in Nx.Shape.gather could fire. Moved the scalar check earlier.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 11c6cc5 commit b60d75a
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14602 | 14602 | | |
14603 | 14603 | | |
14604 | 14604 | | |
| 14605 | + | |
| 14606 | + | |
| 14607 | + | |
| 14608 | + | |
14605 | 14609 | | |
14606 | 14610 | | |
14607 | 14611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments