Skip to content

Propagate missing values in degree-zero B-spline bases - #282

Open
lllleolin-max wants to merge 1 commit into
matthewwardrop:mainfrom
lllleolin-max:codex/preserve-missing-values-in-degree-zero-splines
Open

lllleolin-max wants to merge 1 commit into
matthewwardrop:mainfrom
lllleolin-max:codex/preserve-missing-values-in-degree-zero-splines

Conversation

@lllleolin-max

Copy link
Copy Markdown

Degree-zero B-splines are built from interval comparisons, which turn NaN inputs into all-zero rows. Higher degrees propagate NaN through arithmetic, so the missing-value policy currently depends on spline degree. Explicitly preserve missing values in the returned basis columns. Tests cover ordinary missing values, out-of-domain values under extrapolation="na", retained valid interval coding, and default row dropping when a degree-zero spline is used in a formula.

Validation: the added regression tests fail on main (81e675b) and pass with this patch. Related tests: python -m pytest tests/transforms/test_basis_spline.py -q. Changed files pass ruff check and ruff format.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant