Skip to content

feat(language): a parameter value that is null or NaN is refused when the data is attached - #788

Merged
FBumann merged 2 commits into
mainfrom
feat/parameter-null-refused
Sep 29, 2026
Merged

FBumann merged 2 commits into
mainfrom
feat/parameter-null-refused

Conversation

@FBumann

@FBumann FBumann commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Prompt: Then do a PR about it.
(About Fabian's comment on #750: refuse null and NaN in a parameter table at attach, keep inf as a value.)

Note

The following content was generated by AI.

A parameter value that is null or NaN is refused when the data is attached. A missing row is the only gap a parameter has. inf and -inf stay values. Refs #750. It does not close #750.

Method, gate output, alternatives

What changes

  • docs/reference/language/declarations.md, under parameters: the rule, next to the dtype table that the consumer also enforces at attach.
  • docs/reference/language/absence.md: one sentence that links to the rule, after "A missing parameter row is not absence".
  • ParameterDeclaration docstring (src/mathspec/program.py): the consumer that attaches data refuses a null or NaN, as it refuses a column of the wrong dtype.

Why this is language

Take one spec with one frame. If one engine reads a NaN coefficient as 0 and another lets the NaN drop the row, they build two models (what counts as language). The language already reads a null in a where (ParameterDefined: non-null and finite) and already refuses a null in a relation (relations.md). The consumer enforces the check. specsolve needs the matching refusal.

What this does not do

Gates

  • pixi run test: 2599 passed.
  • pixi run docs-build: no issues.
  • pixi run lint: all hooks pass except pyrefly, which fails locally on untouched origin/main as well (the yaml stubs are installed but not found). CI is the check for it.
  • compile-tex not run: no file under examples/ changed.

🤖 Generated with Claude Code

… the data is attached

A coordinate with no value has no row, so a missing row is the only gap a
parameter has. inf and -inf stay values.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 mathspec | 🛠️ Build #34830583 | 📁 Comparing 5738a52 against latest (ae4a44c)

  🔍 Preview build  

4 files changed
± changelog/index.html
± reference/program/index.html
± reference/language/absence/index.html
± reference/language/declarations/index.html

@FBumann
FBumann merged commit abe9967 into main Sep 29, 2026
5 checks passed
FBumann pushed a commit that referenced this pull request Sep 29, 2026
Takes #788. CHANGELOG keeps both lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VUkQfE5dT7mEGoTQXSxN3
FBumann pushed a commit that referenced this pull request Sep 29, 2026
Takes #788 through #630.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VUkQfE5dT7mEGoTQXSxN3
FBumann pushed a commit that referenced this pull request Sep 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AzXL2w5xdUm8FsYMNWf1KW
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.

a parameter cannot say that a missing row is absent, so a decision supplied as data brings back the rows its mask deleted

1 participant