Commit cc2f1f0
committed
Refactor abs_error_stats, fix zero-index bug
pred_steps and ref_cut were always equal at every call site, making
using two parameters redundant. ref_cut was also a misleading name.
Collapse both into a single steps parameter and replace negative-index
slicing with (err[n-steps:], err[:n-steps]), which correctly handles
steps=0 (full ref, empty pred) — fixing the err[-0:] bug. Change comment
wording.1 parent ec90c2b commit cc2f1f0
File tree
3 files changed
+44
-17
lines changed- Notebooks
- src/nemo_spinup_forecast
- tests
3 files changed
+44
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
604 | | - | |
| 603 | + | |
605 | 604 | | |
606 | 605 | | |
607 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
| 294 | + | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| |||
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
309 | 306 | | |
310 | 307 | | |
311 | 308 | | |
| |||
314 | 311 | | |
315 | 312 | | |
316 | 313 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | 314 | | |
322 | | - | |
323 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
324 | 318 | | |
325 | 319 | | |
326 | 320 | | |
| |||
| 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments