Repository navigation
Commit 5a6171e
committed
fix: clamp move_corr's variances and pin the appending property
move_var and move_std clamp their variance at zero; move_corr computes
var_a/var_b inline and guarded only their product, so two variances that
both rounded slightly negative multiplied to a positive number and passed
the guard. move_corr(a, a, window=5) on a series of zeros followed by a
large constant returned -1.0 where move_var returns 0.0 on the same
windows. Clamping each variance sends those to NaN and leaves
well-conditioned data unchanged.
The offset choice rests on appending to a series not changing results
already emitted, but test_property.py is skipped at module level (an
unconditional skip, so --run-nightly doesn't re-enable it), leaving that
constraint unenforced. Pin it directly in test_moving.py.1 parent 56ff8fc commit 5a6171e
2 files changed
Lines changed: 41 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
341 | 346 | | |
342 | 347 | | |
343 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
344 | 377 | | |
345 | 378 | | |
346 | 379 | | |
| |||
0 commit comments