Skip to content

Allow parameters (X) to use a different dtype than observations in ESMDA - #324

Merged
dafeda merged 1 commit into
equinor:mainfrom
dafeda:remove-type-enforcment
Mar 25, 2026
Merged

Allow parameters (X) to use a different dtype than observations in ESMDA#324
dafeda merged 1 commit into
equinor:mainfrom
dafeda:remove-type-enforcment

Conversation

@dafeda

@dafeda dafeda commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Resolves: #322

@dafeda dafeda self-assigned this Mar 10, 2026
- Replace ALLOWED_DTYPES whitelist with np.issubdtype checks, accepting
  any floating-point dtype instead of only float16/32/64
- Remove dtype enforcement on X (parameters); responses (Y) must still
  match the observations dtype
- Preserve X's original dtype in assimilate_batch by casting the
  ensemble-space update before multiplying with delta_M, avoiding
  a parameter-sized float64 intermediate
- Raise TypeError instead of ValueError for non-floating inputs
@dafeda
dafeda force-pushed the remove-type-enforcment branch from d05dde9 to e6bfcee Compare March 24, 2026 05:43
@dafeda dafeda changed the title Remove dtype validation for inputs in ESMDA Allow parameters (X) to use a different dtype than observations in ESMDA Mar 24, 2026
@dafeda
dafeda requested a review from tommyod March 24, 2026 06:35
@dafeda
dafeda merged commit 9afb2cf into equinor:main Mar 25, 2026
9 checks passed
@dafeda
dafeda deleted the remove-type-enforcment branch March 25, 2026 07:15
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.

Should we require exact dtype matching between observations and covariance?

2 participants