Commit 5237df4
fix(waterdata): materialize numpy/Series numeric params instead of str()-ing them
A numeric (_NO_NORMALIZE_PARAMS) param — water_year, year, month, day,
thresholds, … — passed as a numpy array or pandas Series fell into the
`args[k] = v` passthrough in _get_args without being materialized to a list.
Downstream, the GET comma-join and the chunker both test `list`/`tuple`, so an
ndarray/Series was neither comma-joined nor chunked: e.g.
get_peaks(water_year=np.array([2020, 2021])) produced
`water_year=%5B2020+2021%5D` (the array's repr) instead of
`water_year=2020,2021`. Plain lists already worked.
Split the branch so _NO_NORMALIZE_PARAMS values keep their element types (no
string-normalization) but a non-string iterable is still listified.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ee653e5 commit 5237df4
2 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2015 | 2015 | | |
2016 | 2016 | | |
2017 | 2017 | | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
2023 | 2029 | | |
2024 | 2030 | | |
2025 | 2031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
287 | 299 | | |
288 | 300 | | |
289 | 301 | | |
| |||
0 commit comments