Repository navigation
Commit c9d9817
Skip nonnumeric variables in Dataset weighted arithmetic (#11833)
* Skip nonnumeric variables in Dataset weighted arithmetic
Filter nonnumeric data variables before weighted arithmetic reductions while
preserving the existing sum_of_weights count scope and lazy Dask behavior.
Add NumPy and Dask regressions and document the change.
Co-authored-by: OpenAI Codex <codex@openai.com>
* Check weighted dtype compatibility with either einsum backend
Compare Dataset weighted results or dtype-promotion errors with DataArray
under both use_opt_einsum settings. This preserves coverage of supported
counts and arithmetic without assuming the optional backend is installed.
Co-authored-by: OpenAI Codex <codex@openai.com>
* Preserve backend-specific object counts in weighted tests
Compare Dask object counts with unchanged DataArray behavior while keeping
the explicit NumPy expectation. This preserves coverage without assuming
the newer Dask null handling in the minimum-version environment.
Co-authored-by: OpenAI Codex <codex@openai.com>
* Select Dataset weighted variables by dtype kind
Skip datetime and object variables for weighted arithmetic without reading their data. Keep all variables eligible for sum_of_weights.
Co-authored-by: OpenAI Codex <codex@openai.com>
* Simplify Dataset weighted dtype tests
Co-authored-by: OpenAI Codex <codex@openai.com>
---------
Co-authored-by: OpenAI Codex <codex@openai.com>1 parent 1196b35 commit c9d9817
3 files changed
Lines changed: 67 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
225 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
572 | 577 | | |
573 | 578 | | |
574 | 579 | | |
575 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
576 | 583 | | |
577 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
578 | 594 | | |
579 | 595 | | |
580 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
32 | 77 | | |
33 | 78 | | |
34 | 79 | | |
| |||
0 commit comments