pull_requests: 573579751
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
573579751 | MDExOlB1bGxSZXF1ZXN0NTczNTc5NzUx | 4911 | closed | 0 | Fix behaviour of min_count in reducing functions | 367900 | The first commit modifies existing tests to check Dask-backed arrays are not computed. It also adds some specific checks that the correct result (NaN or a number as appropriate) is returned and some tests for checking membership of `xarray.core.dtypes.NAT_TYPES`. After this commit I get 89 test failures, and they seem to cover the cases reported in #4898. The second commit fixes these failures: * The checks of the nan mask in `xarray.core.nanops._maybe_null_out` are changed to use `np.where` which allows lazy evaluation. * Previously, `xarray.core.dtypes.NAT_TYPES` was a tuple of datetime64 and timedelta64 instances; I've changed it to a set of the dtypes of these instances. It is only used for the membership check in `_maybe_null_out` so a set seems appropriate. The previous use of instances rather than dtypes caused a bug -- ``np.float64 in NAT_TYPES`` returned true even though it only contained datetime64/timedelta64. This meant that reducing operations over all axes (`axis=None` or `...`) with float64 arrays ignored min_count as the membership check in `_maybe_null_out` caused it to be skipped. - [x] Closes #4898 - [x] Tests added - [x] Passes `pre-commit run --all-files` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` | 2021-02-15T13:53:34Z | 2021-02-19T08:12:39Z | 2021-02-19T08:12:02Z | 2021-02-19T08:12:01Z | d61efb687a9b2989ad22c70334b8cc2e32251d16 | 0 | e0dec832c2da733342a689d495748ca9a240dc7e | 7c4e2ac83f7b4306296ff9b7b51aaf016e5ad614 | CONTRIBUTOR | 13221727 | https://github.com/pydata/xarray/pull/4911 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests