Commit 6bc564a
Fold AD output-shape checks into prepare's dispatch
Replace `_assert_supported_output` / `_assert_jacobian_output` with an
`if y isa Number / elseif y isa AbstractVector / else throw` cascade.
The jacobian assertion was unreachable after the scalar branch, and
the supported-output helper had a single call site; inlining the
remaining check as the `else` arm is clearer than two named helpers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9c371b3 commit 6bc564a
1 file changed
Lines changed: 7 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 8 | | |
27 | 9 | | |
28 | 10 | | |
| |||
58 | 40 | | |
59 | 41 | | |
60 | 42 | | |
61 | | - | |
62 | 43 | | |
63 | 44 | | |
64 | 45 | | |
65 | 46 | | |
66 | 47 | | |
67 | | - | |
68 | | - | |
| 48 | + | |
69 | 49 | | |
70 | 50 | | |
71 | 51 | | |
72 | 52 | | |
73 | 53 | | |
74 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
75 | 61 | | |
76 | 62 | | |
77 | 63 | | |
| |||
0 commit comments