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 1032314608,PR_kwDOAMm_X849h97w,6944,closed,0,Fix step plots with hue,20118130,"This PR fixes the broadcasting error when trying to plot multiple step plots, like `arr.plot.step(..., hue=...)` or `arr.plot(..., drawstyle=""steps-mid"")`. Previously, this raised a shape error, as mentioned in https://github.com/pydata/xarray/issues/4288#issuecomment-666485140. Some other relevant work was started (but apparently unfinished) in #4868 and #4866, this doesn't implement those. - [x] Tests added - [x] Fixes applied - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ",2022-08-22T05:00:14Z,2022-08-28T12:39:33Z,2022-08-25T15:56:11Z,2022-08-25T15:56:11Z,434f9e8929942afc2380eab52a07e77d30cc7885,,,0,695235b8d1e54484a6e1c829bbb9205723b5b1eb,15c61822a061153581e44d9c9387e1a352170919,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/6944, 1340771338,PR_kwDOAMm_X85P6owK,7821,closed,0,Implement multidimensional initial guess and bounds for `curvefit`,20118130,"- [x] Closes #7768 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` With this PR, it's possible to pass an initial guess to `curvefit` that is a DataArray, which will be broadcast to the data dimensions. This way, the initial guess can vary with the data coordinates. I also added examples of using `curvefit` to the documentation, both a basic example and one with the multidimensional guess. I have a couple of questions: - Should we change the signature to `p0: dict[str, float | DataArray] | None`, instead of `dict[str, Any]` (and same for bounds)? scipy only optimizes over scalars, so I think it would be safe to assume that the values should either be those, or arrays that can be broadcast. - The usage example of curvefit is only in the docstring for DataArray, so now the docs differ between DA and dataset. But the example uses a DataArray only, so this should be ok, right?",2023-05-06T13:09:49Z,2023-06-01T15:51:40Z,2023-05-31T12:43:07Z,2023-05-31T12:43:07Z,9909f90b4781be89e3f3ff7c87893928b3e3be6e,,,0,d081ee694273d67296b2860c87f60d378ab109fa,f45eb733b97e0a20f2981b6b20e8e8dcc815e529,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/7821, 1340776600,PR_kwDOAMm_X85P6qCY,7822,closed,0,Fix typos in contribution guide,20118130,,2023-05-06T13:29:22Z,2023-05-07T09:12:57Z,2023-05-07T07:34:56Z,2023-05-07T07:34:56Z,2cce9f6539a02a7bdc37a722b6965a51be29a8dd,,,0,00eda7b74e5aea2ae1777be742e97c64d23cfeab,2873831e5048fc630b1eaa5b3316d2e876e1afc7,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/7822, 1377660249,PR_kwDOAMm_X85SHW1Z,7891,closed,0,Add errors option to curvefit,20118130,"- [x] Closes #6317 and closes #6515 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` This is a rebased version of #6515, with the arg `errors = ""raise"" | ""ignore""` added to `Dataset` and `DataArray`, and with tests. Let me know if the tests should be expanded further.",2023-06-04T09:43:06Z,2023-06-16T03:15:07Z,2023-06-16T03:15:06Z,2023-06-16T03:15:06Z,99f95591dcaafb6a5f538700c25a8c52e8a39812,,,0,649932a7d7c70ec7fac542692f81fe3cac5edb88,276b6bf22fdd5d6abeb6236b8e3c63e63049d44a,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/7891, 1378348109,PR_kwDOAMm_X85SJ-xN,7893,closed,0,Fix flaky doctest for curvefit,20118130,"Fix flaky doctest introduced in #7821, see https://github.com/pydata/xarray/pull/7821#issuecomment-1537142237. This uses the `NUMBER` option to compare the output with less decimal precision. It's not part of standard doctest but an extension from pytest: https://docs.pytest.org/en/7.1.x/how-to/doctest.html#using-doctest-options Another option would be to use `...` and the built-in `+ELLIPSIS` option, but IMO the current version is less confusing for someone reading the example.",2023-06-05T06:10:30Z,2023-06-09T15:38:58Z,2023-06-09T15:38:58Z,2023-06-09T15:38:58Z,3459e6fa3c41b9e7b796800682bcf1408467cf1e,,,0,d4ee56a58ce68537fb76a6eef32ae2bf7e868a45,46ef0ca86c8a8cd9e28a1a38c45e2ebb7d022ae0,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/7893, 1479306486,PR_kwDOAMm_X85YLGz2,8079,closed,0,Consistently report all dimensions in error messages if invalid dimensions are given,20118130,"Hello, I noticed that `arr.min(""nonexistent"")` raises an error with a very helpful message ``` ValueError: 'nonexistent' not found in array dimensions ('x', 'y', 'z') ``` while `arr.idxmin(""nonexistent"")` raises ``` KeyError: 'Dimension ""nonexistent"" not in dimension' [sic] ``` IMO, the list of dimensions should always be shown in the error message for these kinds of errors, it makes debugging much easier. With this PR, I have implemented this behavior for all such functions that I could find. There is quite a consistent pattern which I think could be factored out into a function, but I didn't have a clear enough picture of the structure of the whole code to do it. I didn't fix the tests yet, I'll do it if you think this can be merged. - [x] Searched list of issues, couldn't find one related to this - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`",2023-08-17T16:03:53Z,2023-09-09T04:55:43Z,2023-09-09T04:55:43Z,2023-09-09T04:55:43Z,0afbd45bdc52d34fae4cdb6d1d67b468dd7cd4fc,,,0,5b6ebd2cebf80dbcbbf149a66fdecaed23ac9c4a,67268f1159fc5b4aee5c644b37d84036d8fc1528,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/8079, 1481454407,PR_kwDOAMm_X85YTTNH,8089,open,0,WIP: Factor out a function for checking dimension-related errors,20118130,"This is a WIP follow-up for #8079 and I think also for #7051. The pattern ```python missing_dims = set(dims) - set(self.dims) if missing_dims: raise ValueError(f""Dimensions {missing_dims} not found in data dimensions {tuple(self.dims)}"") ``` occurs in many methods, with small variations in the way `missing_dims` is calculated, the error message, and also if it's `ValueError` or `KeyError`. So it would make sense to factor it out. But I'm not familiar enough with the context around #7051 to know how to deal with sets vs tuples, so this is just a sketch for now. - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ",2023-08-19T13:35:29Z,2023-09-12T18:59:32Z,,,2e4469509167bef7e158efa291f06ba8e328a636,,,1,aa6149eaa696c6247a1a18ff7f5066036637015e,2951ce0215f14a8a79ecd0b5fc73a02a34b9b86b,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/8089, 1593867390,PR_kwDOAMm_X85fAHx-,8433,closed,0,Raise exception in to_dataset if resulting variable is also the name of a coordinate,20118130," Let me know if you think the error message is unclear or too verbose or too fancy or something. - [x] Closes #7823 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ",2023-11-09T07:38:20Z,2023-11-14T22:28:17Z,2023-11-14T22:28:17Z,2023-11-14T22:28:17Z,59378ccee5190a78fe628de243551beb470a0172,,,0,a9a45bb8e39a302aca20aec27be3037b3ba1479c,49bd63a8332c1930a866724a2968b2d880dae25e,CONTRIBUTOR,,13221727,https://github.com/pydata/xarray/pull/8433,