Commit b46e204
Fix append! for matrix bounds in batch models
Add _reshape_to_match to correctly handle array bounds regardless of
input shape. For non-batch (Vector target), matrices are vecd. For
batch (Matrix target), matrices are reshaped to match trailing dims.
This fixes the DimensionMismatch when passing matrix lvar/uvar to
batch models, while preserving the existing behavior for non-batch
models that receive matrix-shaped comprehension results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent f13f998 commit b46e204
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
683 | 694 | | |
684 | 695 | | |
685 | 696 | | |
| |||
689 | 700 | | |
690 | 701 | | |
691 | 702 | | |
692 | | - | |
693 | | - | |
| 703 | + | |
694 | 704 | | |
695 | 705 | | |
696 | 706 | | |
| |||
0 commit comments