Skip to content

validate recomb matrix entries are numbers - #4545

Merged
lovell merged 1 commit into
lovell:mainfrom
metsw24-max:recomb-validate-numbers
Jun 15, 2026
Merged

validate recomb matrix entries are numbers#4545
lovell merged 1 commit into
lovell:mainfrom
metsw24-max:recomb-validate-numbers

Conversation

@metsw24-max

Copy link
Copy Markdown
Contributor

Inconsistent type checking in recomb
The recombination matrix is flattened and passed through map(Number), so non-numeric entries are silently coerced rather than rejected: a stray string becomes NaN while true and null turn into 1 and 0 before they reach the native matrix. The sibling affine and linear operations already guard their input with is.number, so this should keep the behaviour consistent and surface the mistake to the caller instead of producing a quietly wrong result.

@lovell
lovell merged commit 06edd9f into lovell:main Jun 15, 2026
32 checks passed
@lovell

lovell commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Thank you!

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

Labels

None yet

2 participants