Commit 39b97bb
committed
refactor(math): use explicit select case for diff shape allocation
Improved the boundary condition handling in diff_2 functions by
using an explicit select case for dimensions. This ensures that:
1. Shape preservation logic is clear.
2. Invalid dimension values (dim_ != 1 or 2) trigger a descriptive error stop.1 parent e7f4fa4 commit 39b97bb
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
0 commit comments