html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/7871#issuecomment-1568557130,https://api.github.com/repos/pydata/xarray/issues/7871,1568557130,IC_kwDOAMm_X85dfkhK,10194086,2023-05-30T14:40:50Z,2023-05-30T14:40:50Z,MEMBER,I am closing this. Feel free to re-open/ or open a new issue.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7871#issuecomment-1562707652,https://api.github.com/repos/pydata/xarray/issues/7871,1562707652,IC_kwDOAMm_X85dJQbE,10194086,2023-05-25T11:02:29Z,2023-05-25T11:02:29Z,MEMBER,"Yes float64 should cause less imprecision. You can convert using `astype`:

```python
import numpy as np
import xarray as xr

da = xr.DataArray(np.array([1, 2], dtype=np.float32))

da = da.astype(float)
```

As for the other problems I think you are better of asking the people over at rioxarray. However, you should first gather all the steps you did to convert the data as code. This way it is easier to see what you are actually doing.


","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7871#issuecomment-1562605326,https://api.github.com/repos/pydata/xarray/issues/7871,1562605326,IC_kwDOAMm_X85dI3cO,10194086,2023-05-25T09:44:31Z,2023-05-25T09:44:31Z,MEMBER,"xarray handles nan values and ignores them per default - so you don't need to remove them. For example:
```python
import numpy as np
import xarray as xr

da = xr.DataArray([1, 2, 3, np.nan])
da.mean()
```
If you have precision problems - that might be because you have `float32` values. 

I don't know what goes wrong with your lon values - that is an issue in the reprojection. You could convert them to 0...360 by using 

```python

lon_dim = ""x""
new_lon = np.mod(da[lon_dim], 360)
da = da.assign_coords(**{lon_dim: new_lon})
da.reindex(**{lon_dim : np.sort(da[lon_dim])})

```


","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7871#issuecomment-1560777789,https://api.github.com/repos/pydata/xarray/issues/7871,1560777789,IC_kwDOAMm_X85dB5Q9,10194086,2023-05-24T09:32:46Z,2023-05-24T09:32:46Z,MEMBER,"Yes but there are less - so as mentioned it removes all columns/ rows with _only_ nans, if there is at least one non-nan value the row is kept.

What is the reason that you want to get rid of the nan values?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7871#issuecomment-1560587282,https://api.github.com/repos/pydata/xarray/issues/7871,1560587282,IC_kwDOAMm_X85dBKwS,10194086,2023-05-24T07:24:37Z,2023-05-24T07:24:37Z,MEMBER,"Can you try `notnull` instead of `isnull` - I often get the boolean array wrong in `where`:

```python
da = ds['z']
da = da.where(da.notnull(), drop=True)
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7871#issuecomment-1560572196,https://api.github.com/repos/pydata/xarray/issues/7871,1560572196,IC_kwDOAMm_X85dBHEk,10194086,2023-05-24T07:12:28Z,2023-05-24T07:12:28Z,MEMBER,"What is the reason that you want to get rid of the nan values?

The reason they come back is that are needed to fill the grid again. The dataframe is 1D but the dataarray is 2D.

What you can try is to use `where`:

```python
da = ds['z']
da = da.where(da.isnull(), drop=True)
```
but it will only drop the values if the _entire_ row/ column is nan.


","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051
https://github.com/pydata/xarray/issues/7860#issuecomment-1557319228,https://api.github.com/repos/pydata/xarray/issues/7860,1557319228,IC_kwDOAMm_X85c0s48,10194086,2023-05-22T14:25:52Z,2023-05-22T14:25:52Z,MEMBER,cc @spencerkclark @znicholls ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1719805837
https://github.com/pydata/xarray/issues/7773#issuecomment-1519846343,https://api.github.com/repos/pydata/xarray/issues/7773,1519846343,IC_kwDOAMm_X85alwPH,10194086,2023-04-24T10:14:22Z,2023-04-24T10:14:22Z,MEMBER,I am closing this as an upstream issue - feel free to reopen if you disagree.,"{""total_count"": 2, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 1}",,1676792648
https://github.com/pydata/xarray/issues/7730#issuecomment-1505309893,https://api.github.com/repos/pydata/xarray/issues/7730,1505309893,IC_kwDOAMm_X85ZuTTF,10194086,2023-04-12T13:47:19Z,2023-04-12T13:47:19Z,MEMBER,Thanks for looking into this!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1657036222
https://github.com/pydata/xarray/issues/7730#issuecomment-1499263329,https://api.github.com/repos/pydata/xarray/issues/7730,1499263329,IC_kwDOAMm_X85ZXPFh,10194086,2023-04-06T15:36:32Z,2023-04-06T15:36:32Z,MEMBER,Of course - I added it above.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1657036222
https://github.com/pydata/xarray/pull/7612#issuecomment-1468796374,https://api.github.com/repos/pydata/xarray/issues/7612,1468796374,IC_kwDOAMm_X85XjA3W,10194086,2023-03-14T20:30:17Z,2023-03-14T20:30:17Z,MEMBER,"I think this is 'fixed' since cartopy 0.20 (SciTools/cartopy#1646) and matplotlib 3.3 (matplotlib/matplotlib#18398) both of which are `>=` our minimum version requirements. So yes, I think it could be remove. However, that should not stop us from merging this PR I'd say.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1620317764
https://github.com/pydata/xarray/issues/5985#issuecomment-1466374343,https://api.github.com/repos/pydata/xarray/issues/5985,1466374343,IC_kwDOAMm_X85XZxjH,10194086,2023-03-13T15:32:45Z,2023-03-13T15:32:45Z,MEMBER,I probably got this from a pandas issue/ pull request - but I can't remember where exactly - sorry...,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606
https://github.com/pydata/xarray/pull/7612#issuecomment-1465302287,https://api.github.com/repos/pydata/xarray/issues/7612,1465302287,IC_kwDOAMm_X85XVr0P,10194086,2023-03-12T21:18:56Z,2023-03-12T21:18:56Z,MEMBER,Nice! (at one point we can consider removing `infer_intervals` as this is now also done in matplotlib and cartopy). ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1620317764
https://github.com/pydata/xarray/pull/7494#issuecomment-1450003953,https://api.github.com/repos/pydata/xarray/issues/7494,1450003953,IC_kwDOAMm_X85WbU3x,10194086,2023-03-01T11:55:41Z,2023-03-01T11:55:41Z,MEMBER,"I think that's in the tests themselves

https://github.com/pydata/xarray/blob/6531b57f8c5cb7f3c564ff895c2e4b6573bb5521/xarray/tests/test_coding_times.py#L778

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1563270549
https://github.com/pydata/xarray/pull/7481#issuecomment-1429484291,https://api.github.com/repos/pydata/xarray/issues/7481,1429484291,IC_kwDOAMm_X85VNDMD,10194086,2023-02-14T10:23:17Z,2023-02-14T10:23:17Z,MEMBER,This should merge on green - thanks for your contribution @pierreloicq!,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1559907732
https://github.com/pydata/xarray/issues/7467#issuecomment-1413761706,https://api.github.com/repos/pydata/xarray/issues/7467,1413761706,IC_kwDOAMm_X85UREqq,10194086,2023-02-02T13:39:01Z,2023-02-02T13:39:01Z,MEMBER,I think the problem is that there is no way to pin optional dependecies in conda. I understand your frustration but it's not practical to explicitly test for all of this in the code. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1552630830
https://github.com/pydata/xarray/pull/7481#issuecomment-1410237123,https://api.github.com/repos/pydata/xarray/issues/7481,1410237123,IC_kwDOAMm_X85UDoLD,10194086,2023-01-31T12:08:27Z,2023-01-31T12:08:27Z,MEMBER,Thanks for the PR. Should that be `summed over`? The test failure should be unrelated.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1559907732
https://github.com/pydata/xarray/pull/7494#issuecomment-1410233955,https://api.github.com/repos/pydata/xarray/issues/7494,1410233955,IC_kwDOAMm_X85UDnZj,10194086,2023-01-31T12:06:00Z,2023-01-31T12:06:00Z,MEMBER,"Thanks for the PR. However, does that actually make a difference? To me it looks like `_contains_cftime_datetimes` also only considers one element of the array.

https://github.com/pydata/xarray/blob/b4515582ffc8b7f63632bfccd109d19889d00384/xarray/core/common.py#L1779-L1780","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1563270549
https://github.com/pydata/xarray/issues/7401#issuecomment-1366550470,https://api.github.com/repos/pydata/xarray/issues/7401,1366550470,IC_kwDOAMm_X85Rc-fG,10194086,2022-12-28T10:36:03Z,2022-12-28T10:36:03Z,MEMBER,"Good point. Combining two `FacetGrids` is a good use case. My intuition would be to allow passing _exactly_ the correct number of axes and not the figure. But then I have not heard from subfigure before now and this may also be a valid option.

```python
f, axs = plt.subplots(2, 4)
da1.plot(col='season', ax=axs[0, :])
da2.plot(col='season', ax=axs[1, :])
```

","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1510151748
https://github.com/pydata/xarray/issues/7401#issuecomment-1364669991,https://api.github.com/repos/pydata/xarray/issues/7401,1364669991,IC_kwDOAMm_X85RVzYn,10194086,2022-12-25T12:01:27Z,2022-12-25T12:01:27Z,MEMBER,I think the usual workflow is to create the figure with gridspec and then update the created subplots and figure. Is there something that is not possible if done this way around? ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1510151748
https://github.com/pydata/xarray/pull/7393#issuecomment-1364417035,https://api.github.com/repos/pydata/xarray/issues/7393,1364417035,IC_kwDOAMm_X85RU1oL,10194086,2022-12-24T00:08:00Z,2022-12-24T00:08:00Z,MEMBER,Thanks @itcarroll and welcome to xarray!,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 1, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1503973868
https://github.com/pydata/xarray/pull/7399#issuecomment-1364416578,https://api.github.com/repos/pydata/xarray/issues/7399,1364416578,IC_kwDOAMm_X85RU1hC,10194086,2022-12-24T00:05:49Z,2022-12-24T00:05:49Z,MEMBER,Looks good. #7027 may be somewhat related.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1507817863
https://github.com/pydata/xarray/issues/7355#issuecomment-1353014947,https://api.github.com/repos/pydata/xarray/issues/7355,1353014947,IC_kwDOAMm_X85QpV6j,10194086,2022-12-15T12:50:31Z,2022-12-15T12:50:31Z,MEMBER,"You installed dask with pip so the following should get you there

```bash
python -m pip install --upgrade dask
```

However, your environment is a mix of packages installed with conda and pip - it's generally recommended to install everything with the same installer. Thus my suggestion would be to create a new environment and install everything with conda. You may also want to take a look at mamba - mamba is a drop-in replacement for conda that is (currently and for most cases) faster than conda, and thus more enjoyable to work with.


","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1474805252
https://github.com/pydata/xarray/pull/7361#issuecomment-1352174057,https://api.github.com/repos/pydata/xarray/issues/7361,1352174057,IC_kwDOAMm_X85QmInp,10194086,2022-12-14T21:03:50Z,2022-12-14T21:03:50Z,MEMBER,Thanks @mroeschke ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1477931237
https://github.com/pydata/xarray/pull/7364#issuecomment-1345391861,https://api.github.com/repos/pydata/xarray/issues/7364,1345391861,IC_kwDOAMm_X85QMQz1,10194086,2022-12-10T21:52:49Z,2022-12-10T21:52:49Z,MEMBER,Thanks @slevang! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1483235066
https://github.com/pydata/xarray/issues/7355#issuecomment-1342778503,https://api.github.com/repos/pydata/xarray/issues/7355,1342778503,IC_kwDOAMm_X85QCSyH,10194086,2022-12-08T13:58:19Z,2022-12-08T13:58:19Z,MEMBER,@ChukwuwikeCephas I am closing this issue - feel free to reopen (or open a new one) if you have further questions.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1474805252
https://github.com/pydata/xarray/issues/7355#issuecomment-1337039422,https://api.github.com/repos/pydata/xarray/issues/7355,1337039422,IC_kwDOAMm_X85PsZo-,10194086,2022-12-05T09:43:55Z,2022-12-05T09:43:55Z,MEMBER,"> NameError: name 'xr' is not defined

I had not realized that you did not import xarray yourself but this is done via plotly. It's usually done as `import xarray as xr`. So `xr.show_versions()` would also output some version info. But I could also get the info from your `conda list` output.


From this I can see the version of dask and xarray you have installed:
```
dask                      2021.1.0                 pypi_0    pypi
xarray                    2022.6.0           pyhd8ed1ab_1    conda-forge
```

However, xarray version 2022.06 requires a newer dask version you have installed.

https://github.com/pydata/xarray/blob/4ad706fc4ef102c525555d55b20bc7ccc72d7045/ci/requirements/min-all-deps.yml#L18

So you can try to update your dask version.


","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1474805252
https://github.com/pydata/xarray/issues/7355#issuecomment-1336439816,https://api.github.com/repos/pydata/xarray/issues/7355,1336439816,IC_kwDOAMm_X85PqHQI,10194086,2022-12-04T15:26:56Z,2022-12-04T15:26:56Z,MEMBER,"Is that the whole output of `xr.show_versions()`?

Can you paste the output of `conda list` or `pip freeze`?  Thanks! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1474805252
https://github.com/pydata/xarray/pull/7353#issuecomment-1336428214,https://api.github.com/repos/pydata/xarray/issues/7353,1336428214,IC_kwDOAMm_X85PqEa2,10194086,2022-12-04T14:36:33Z,2022-12-04T14:36:33Z,MEMBER,"

```bash
mamba repoquery whoneeds netcdf4
```

but that requires an already solved environment ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1474717029
https://github.com/pydata/xarray/issues/7322#issuecomment-1328865926,https://api.github.com/repos/pydata/xarray/issues/7322,1328865926,IC_kwDOAMm_X85PNOKG,10194086,2022-11-28T10:42:00Z,2022-11-28T10:45:38Z,MEMBER,aiobotocore pins botocore as the versions must match (see aio-libs/aiobotocore#983). I opened #7326 to suppress the warning in our tests.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1464905814
https://github.com/pydata/xarray/pull/7321#issuecomment-1328827403,https://api.github.com/repos/pydata/xarray/issues/7321,1328827403,IC_kwDOAMm_X85PNEwL,10194086,2022-11-28T10:10:33Z,2022-11-28T10:10:33Z,MEMBER,Thanks for the context @keewis - I like your suggestion & updated the PR. AFAIK we have not changed the ignored values in a very long time. I'll merge once the tests ran through.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1464824094
https://github.com/pydata/xarray/pull/7276#issuecomment-1310909497,https://api.github.com/repos/pydata/xarray/issues/7276,1310909497,IC_kwDOAMm_X85OIuQ5,10194086,2022-11-10T21:24:45Z,2022-11-10T21:24:45Z,MEMBER,Close/ reopen,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1442702272
https://github.com/pydata/xarray/issues/7273#issuecomment-1310901060,https://api.github.com/repos/pydata/xarray/issues/7273,1310901060,IC_kwDOAMm_X85OIsNE,10194086,2022-11-10T21:16:29Z,2022-11-10T21:16:29Z,MEMBER,"I suspect there are floating point inaccuracies which can sometimes trip up xarray. But I would also not expect differences when the coords are created with the same piece of code. 

Unfortunately your test does not work - it will first align and then do the subtraction... Any of the following should work:

```python
(d0.y - d1.y).shape == d0.shape
d0.y.values == d1.y.values
xr.align(d0, d1, join=""exact"")
```


If this worked earlier ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1441345452
https://github.com/pydata/xarray/pull/7276#issuecomment-1310895973,https://api.github.com/repos/pydata/xarray/issues/7276,1310895973,IC_kwDOAMm_X85OIq9l,10194086,2022-11-10T21:10:32Z,2022-11-10T21:10:32Z,MEMBER,Looks good - thanks! Should auto-merge on green.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1442702272
https://github.com/pydata/xarray/issues/7273#issuecomment-1309335895,https://api.github.com/repos/pydata/xarray/issues/7273,1309335895,IC_kwDOAMm_X85OCuFX,10194086,2022-11-09T20:25:36Z,2022-11-09T20:25:36Z,MEMBER,Could it be that the coordinates of the individual arrays are not exactly the same?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1441345452
https://github.com/pydata/xarray/issues/7256#issuecomment-1303302202,https://api.github.com/repos/pydata/xarray/issues/7256,1303302202,IC_kwDOAMm_X85NrtA6,10194086,2022-11-04T11:38:19Z,2022-11-04T11:38:19Z,MEMBER,"For context: the `group` / `groupstr`confusion may stem from our (quite) old docs, where the type hints were not rendered nicely: https://docs.xarray.dev/en/v0.12.3/generated/xarray.open_dataset.html","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1435219725
https://github.com/pydata/xarray/pull/7238#issuecomment-1301816540,https://api.github.com/repos/pydata/xarray/issues/7238,1301816540,IC_kwDOAMm_X85NmCTc,10194086,2022-11-03T09:09:25Z,2022-11-03T09:09:25Z,MEMBER,Pandas has a `find_stack_level` function (https://github.com/pandas-dev/pandas/blob/0106c26529900bad0561efb9c9180f7f016365b0/pandas/util/_exceptions.py#L28). But I am not sure if this would fix the problem?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1428748922
https://github.com/pydata/xarray/pull/7252#issuecomment-1301807258,https://api.github.com/repos/pydata/xarray/issues/7252,1301807258,IC_kwDOAMm_X85NmACa,10194086,2022-11-03T09:01:11Z,2022-11-03T09:01:11Z,MEMBER,Good catch - this should merge once all tests are green. Thanks @marekninja - welcome to xarray!,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,1434251512
https://github.com/pydata/xarray/pull/7252#issuecomment-1301805415,https://api.github.com/repos/pydata/xarray/issues/7252,1301805415,IC_kwDOAMm_X85Nl_ln,10194086,2022-11-03T08:59:19Z,2022-11-03T08:59:19Z,MEMBER,Close/ reopen to check if the docs now pass.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1434251512
https://github.com/pydata/xarray/pull/7241#issuecomment-1297644407,https://api.github.com/repos/pydata/xarray/issues/7241,1297644407,IC_kwDOAMm_X85NWHt3,10194086,2022-10-31T20:29:05Z,2022-10-31T20:29:05Z,MEMBER,Thanks @keewis ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1429306020
https://github.com/pydata/xarray/issues/7164#issuecomment-1282128315,https://api.github.com/repos/pydata/xarray/issues/7164,1282128315,IC_kwDOAMm_X85Ma7m7,10194086,2022-10-18T09:51:20Z,2022-10-18T09:51:20Z,MEMBER,Yes I mean the external ones. I agree that it is a good idea to disallow internal warnings (sometimes PRs introduce them without realizing...). And of course I also agree that we should act when then deprecation warnings are being thrown and not when the stuff is actually removed.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1410336255
https://github.com/pydata/xarray/issues/7164#issuecomment-1281229222,https://api.github.com/repos/pydata/xarray/issues/7164,1281229222,IC_kwDOAMm_X85MXgGm,10194086,2022-10-17T17:42:05Z,2022-10-17T17:42:05Z,MEMBER,"I am a bit skeptical - we test a large range of versions and the kinds of warnings we get can be quite different. I fear that we get too many false positives and end up wrapping everything with `filterwarnings(""ignore"")`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1410336255
https://github.com/pydata/xarray/issues/7148#issuecomment-1272481643,https://api.github.com/repos/pydata/xarray/issues/7148,1272481643,IC_kwDOAMm_X85L2Idr,10194086,2022-10-09T07:56:00Z,2022-10-09T07:56:00Z,MEMBER,Thanks for the report. There was a recent release (2022.09) with many Index related bugfixes (including MuliIndex) - could you test this? ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402168223
https://github.com/pydata/xarray/pull/6778#issuecomment-1272024495,https://api.github.com/repos/pydata/xarray/issues/6778,1272024495,IC_kwDOAMm_X85L0Y2v,10194086,2022-10-07T19:37:18Z,2022-10-07T19:37:18Z,MEMBER,Nice work! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1302483271
https://github.com/pydata/xarray/issues/7128#issuecomment-1268602201,https://api.github.com/repos/pydata/xarray/issues/7128,1268602201,IC_kwDOAMm_X85LnVVZ,10194086,2022-10-05T15:33:21Z,2022-10-05T15:33:21Z,MEMBER,You'll have to uninstall bottleneck then - the `use_bottleneck` option was added more recently. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1396969695
https://github.com/pydata/xarray/issues/7128#issuecomment-1267982121,https://api.github.com/repos/pydata/xarray/issues/7128,1267982121,IC_kwDOAMm_X85Lk98p,10194086,2022-10-05T06:04:16Z,2022-10-05T06:08:46Z,MEMBER,"Do you have bottleneck installed? Could you try `xr.set_options(use_bottleneck=False)`?

See pydata/bottleneck#379 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1396969695
https://github.com/pydata/xarray/issues/7091#issuecomment-1259061553,https://api.github.com/repos/pydata/xarray/issues/7091,1259061553,IC_kwDOAMm_X85LC8Ex,10194086,2022-09-27T06:51:16Z,2022-09-27T06:51:16Z,MEMBER,"Indeed, this looks incomplete. As always - PR very welcome 😁","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1386771423
https://github.com/pydata/xarray/pull/7072#issuecomment-1259059887,https://api.github.com/repos/pydata/xarray/issues/7072,1259059887,IC_kwDOAMm_X85LC7qv,10194086,2022-09-27T06:49:56Z,2022-09-27T06:49:56Z,MEMBER,Thanks @arfriedman! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1383059787
https://github.com/pydata/xarray/pull/7081#issuecomment-1257690344,https://api.github.com/repos/pydata/xarray/issues/7081,1257690344,IC_kwDOAMm_X85K9tTo,10194086,2022-09-26T08:37:15Z,2022-09-26T08:37:15Z,MEMBER,Close/ reopen ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1385474758
https://github.com/pydata/xarray/pull/7052#issuecomment-1257178756,https://api.github.com/repos/pydata/xarray/issues/7052,1257178756,IC_kwDOAMm_X85K7waE,10194086,2022-09-25T11:57:02Z,2022-09-25T11:57:22Z,MEMBER,I'd opt for (1) & a comment on why it needs a separate module. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1377128403
https://github.com/pydata/xarray/pull/7047#issuecomment-1256249329,https://api.github.com/repos/pydata/xarray/issues/7047,1256249329,IC_kwDOAMm_X85K4Nfx,10194086,2022-09-23T13:55:49Z,2022-09-23T13:55:49Z,MEMBER,"Maybe:
```python
len(list(ax.get_shared_x_axes())) != 0
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376156646
https://github.com/pydata/xarray/pull/7004#issuecomment-1255524719,https://api.github.com/repos/pydata/xarray/issues/7004,1255524719,IC_kwDOAMm_X85K1clv,10194086,2022-09-22T20:38:40Z,2022-09-22T20:38:40Z,MEMBER,"It would be nice to be able to preserve the MultiIndex with sel (e.g. `ds.sel(one=[""a""]`) but if it makes the behavior inconsistent it is no good either...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1364798843
https://github.com/pydata/xarray/pull/7047#issuecomment-1255522455,https://api.github.com/repos/pydata/xarray/issues/7047,1255522455,IC_kwDOAMm_X85K1cCX,10194086,2022-09-22T20:36:06Z,2022-09-22T20:36:06Z,MEMBER,Does this warrant a test? But good to go anyways.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376156646
https://github.com/pydata/xarray/pull/7051#issuecomment-1255518131,https://api.github.com/repos/pydata/xarray/issues/7051,1255518131,IC_kwDOAMm_X85K1a-z,10194086,2022-09-22T20:31:13Z,2022-09-22T20:31:13Z,MEMBER,"For `xr.dot` it's also different:

```python
xr.dot(a, b, dims=None) # reduce over common dimensions
xr.dot(a, b, dims=...) # reduce over all dimensions
```




","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1377097243
https://github.com/pydata/xarray/pull/7040#issuecomment-1255409414,https://api.github.com/repos/pydata/xarray/issues/7040,1255409414,IC_kwDOAMm_X85K1AcG,10194086,2022-09-22T18:39:49Z,2022-09-22T18:39:49Z,MEMBER,Thanks! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1373561771
https://github.com/pydata/xarray/issues/7036#issuecomment-1246650824,https://api.github.com/repos/pydata/xarray/issues/7036,1246650824,IC_kwDOAMm_X85KTmHI,10194086,2022-09-14T11:52:00Z,2022-09-14T11:52:00Z,MEMBER,Thanks - I missed #6992 & it indeed fixes the problems I had. I added this to the list of fixed issues in #6992.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1372729718
https://github.com/pydata/xarray/issues/7036#issuecomment-1246556636,https://api.github.com/repos/pydata/xarray/issues/7036,1246556636,IC_kwDOAMm_X85KTPHc,10194086,2022-09-14T10:22:46Z,2022-09-14T10:22:46Z,MEMBER,"Similarly, the following results in a wrong repr:


```python
import xarray as xr
ds = xr.Dataset(data_vars={""foo"": 1}, coords={""a"": (""x"", [1, 2, 3]), ""b"": (""x"", ['a', 'b', 'c'])})
ds.set_index(z=['a', 'b']).reset_index(""z"", drop=True)
```

```
<xarray.Dataset>
Dimensions:  (z: 3)
Coordinates:
    a        (z) int64 1 2 3
    b        (z) <U1 'a' 'b' 'c'
Data variables:
    *empty*
```

foo is missing.

@benbovy 
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1372729718
https://github.com/pydata/xarray/issues/7021#issuecomment-1244602741,https://api.github.com/repos/pydata/xarray/issues/7021,1244602741,IC_kwDOAMm_X85KLyF1,10194086,2022-09-12T22:23:27Z,2022-09-12T22:23:27Z,MEMBER,"Thanks for the report & I agree that this should lead to the same but the code paths are indeed different - but I have not looked in to the actual root cause. Could be that this is also not super thoroughly tested (and used!):

https://github.com/pydata/xarray/blob/b018442c8dfa3e71ec35e294de69e2011949afec/xarray/core/rolling.py#L289

https://github.com/pydata/xarray/blob/b018442c8dfa3e71ec35e294de69e2011949afec/xarray/core/rolling.py#L721

B.t.w. a copy-pastable example would be appreciated.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1370063272
https://github.com/pydata/xarray/pull/7023#issuecomment-1244595823,https://api.github.com/repos/pydata/xarray/issues/7023,1244595823,IC_kwDOAMm_X85KLwZv,10194086,2022-09-12T22:19:25Z,2022-09-12T22:19:25Z,MEMBER,Interesting - did not think that this would work. Potential follow up - make all imports of dask lazy (#6726).,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1370416843
https://github.com/pydata/xarray/pull/6974#issuecomment-1244589007,https://api.github.com/repos/pydata/xarray/issues/6974,1244589007,IC_kwDOAMm_X85KLuvP,10194086,2022-09-12T22:15:10Z,2022-09-12T22:15:10Z,MEMBER,"Let's see if that works now - should auto-merge on green.

Thanks for your contribution and welcome to xarray!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1358247997
https://github.com/pydata/xarray/pull/7026#issuecomment-1244584460,https://api.github.com/repos/pydata/xarray/issues/7026,1244584460,IC_kwDOAMm_X85KLtoM,10194086,2022-09-12T22:12:31Z,2022-09-12T22:12:31Z,MEMBER,Thanks!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1370494294
https://github.com/pydata/xarray/issues/7012#issuecomment-1243930142,https://api.github.com/repos/pydata/xarray/issues/7012,1243930142,IC_kwDOAMm_X85KJN4e,10194086,2022-09-12T15:42:33Z,2022-09-12T15:42:33Z,MEMBER,cc @dcherian ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1367029446
https://github.com/pydata/xarray/issues/7012#issuecomment-1242640032,https://api.github.com/repos/pydata/xarray/issues/7012,1242640032,IC_kwDOAMm_X85KES6g,10194086,2022-09-10T06:01:49Z,2022-09-10T06:01:49Z,MEMBER,Ah - I probably don't have flox installed - that could be the reason. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1367029446
https://github.com/pydata/xarray/pull/6994#issuecomment-1241525315,https://api.github.com/repos/pydata/xarray/issues/6994,1241525315,IC_kwDOAMm_X85KACxD,10194086,2022-09-09T05:48:31Z,2022-09-09T05:48:31Z,MEMBER,Thanks @headtr1ck!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1362485455
https://github.com/pydata/xarray/issues/7012#issuecomment-1241523928,https://api.github.com/repos/pydata/xarray/issues/7012,1241523928,IC_kwDOAMm_X85KACbY,10194086,2022-09-09T05:46:16Z,2022-09-09T05:46:16Z,MEMBER,"I cannot reproduce this (on master but I don't think we touched this since 2022.06):

```python
import xarray as xr
import cf_xarray
air = xr.tutorial.open_dataset(""air_temperature"")
air.resample(time=""MS"").mean(dim=""time"").lat
```
Returns
```
<xarray.DataArray 'lat' (lat: 25)>
array([75. , 72.5, 70. , 67.5, 65. , 62.5, 60. , 57.5, 55. , 52.5, 50. , 47.5,
       45. , 42.5, 40. , 37.5, 35. , 32.5, 30. , 27.5, 25. , 22.5, 20. , 17.5,
       15. ], dtype=float32)
Coordinates:
  * lat      (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0
Attributes:
    standard_name:  latitude
    long_name:      Latitude
    units:          degrees_north
    axis:           Y
```
Would be interesting to get to the bottom of this. 

(Funny enough - the attrs are not even dropped for `r.mean(keep_attrs=False).lat`.)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1367029446
https://github.com/pydata/xarray/issues/6997#issuecomment-1240894673,https://api.github.com/repos/pydata/xarray/issues/6997,1240894673,IC_kwDOAMm_X85J9ozR,10194086,2022-09-08T15:42:57Z,2022-09-08T15:42:57Z,MEMBER,"> Ok, thanks, that solves the problem!

Great to hear!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363366455
https://github.com/pydata/xarray/issues/6997#issuecomment-1240475373,https://api.github.com/repos/pydata/xarray/issues/6997,1240475373,IC_kwDOAMm_X85J8Cbt,10194086,2022-09-08T09:39:40Z,2022-09-08T09:39:40Z,MEMBER,"Ok, I see there is another bugfix in v0.21.0 (#6118) - thus you will need at least this version for your example to work.





","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363366455
https://github.com/pydata/xarray/issues/6997#issuecomment-1239490021,https://api.github.com/repos/pydata/xarray/issues/6997,1239490021,IC_kwDOAMm_X85J4R3l,10194086,2022-09-07T14:46:04Z,2022-09-07T14:47:13Z,MEMBER,"What version of xarray are you using? I think this should have been fixed in #5187 (i.e. in v0.18.0).

Edit: quickly checked and the newest version gets this right.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363366455
https://github.com/pydata/xarray/pull/3925#issuecomment-1239471756,https://api.github.com/repos/pydata/xarray/issues/3925,1239471756,IC_kwDOAMm_X85J4NaM,10194086,2022-09-07T14:31:58Z,2022-09-07T14:31:58Z,MEMBER,With #6971 on the way I guess we can close this.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,592312709
https://github.com/pydata/xarray/pull/6939#issuecomment-1237508449,https://api.github.com/repos/pydata/xarray/issues/6939,1237508449,IC_kwDOAMm_X85JwuFh,10194086,2022-09-05T22:40:30Z,2022-09-05T22:40:30Z,MEMBER,Thanks @headtr1ck!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1345227910
https://github.com/pydata/xarray/issues/6983#issuecomment-1236662278,https://api.github.com/repos/pydata/xarray/issues/6983,1236662278,IC_kwDOAMm_X85JtfgG,10194086,2022-09-05T07:56:44Z,2022-09-05T07:56:44Z,MEMBER,Closing in favour of #6984,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1360984454
https://github.com/pydata/xarray/pull/6212#issuecomment-1236657868,https://api.github.com/repos/pydata/xarray/issues/6212,1236657868,IC_kwDOAMm_X85JtebM,10194086,2022-09-05T07:52:02Z,2022-09-05T07:52:02Z,MEMBER,"Ok merging this. I think we got some to fix it if this ever causes trouble for a future version of python.

cc @headtr1ck ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1118802352
https://github.com/pydata/xarray/pull/6986#issuecomment-1236577493,https://api.github.com/repos/pydata/xarray/issues/6986,1236577493,IC_kwDOAMm_X85JtKzV,10194086,2022-09-05T06:14:43Z,2022-09-05T06:14:43Z,MEMBER,"> I could not get rid of `RuntimeWarning: All-NaN slice encountered` for tests with dask. Does anyone know why is that? pytest.mark.filterwarnings does not seem to capture them... 

Yes, because we remove them in our `assert*` checks. Would be fixed with #6212 using somewhat non-public API. We should probably do it anyway...","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1361262641
https://github.com/pydata/xarray/pull/6980#issuecomment-1236119333,https://api.github.com/repos/pydata/xarray/issues/6980,1236119333,IC_kwDOAMm_X85Jra8l,10194086,2022-09-03T13:20:01Z,2022-09-03T13:20:01Z,MEMBER,Thanks!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1359532011
https://github.com/pydata/xarray/issues/6976#issuecomment-1235549943,https://api.github.com/repos/pydata/xarray/issues/6976,1235549943,IC_kwDOAMm_X85JpP73,10194086,2022-09-02T14:06:54Z,2022-09-02T14:06:54Z,MEMBER,"Jup, that's always the tradeoff - #1613 discusses a similar case.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1358960570
https://github.com/pydata/xarray/issues/6976#issuecomment-1234453085,https://api.github.com/repos/pydata/xarray/issues/6976,1234453085,IC_kwDOAMm_X85JlEJd,10194086,2022-09-01T15:37:25Z,2022-09-01T15:37:25Z,MEMBER,"A smaller repro:

```python
import numpy as np
import xarray as xr

xr.DataArray(np.arange(5), dims=""x"", coords={""x"": [2, 1, 0, 3, 5]})

da.sel(x=slice(2, 3))

```

Returns:
```
<xarray.DataArray (x: 4)>
array([0, 1, 2, 3])
Coordinates:
  * x        (x) int64 2 4 5 3
```


```python
da.sel(x=[2, 3])
``` 
Returns
```
<xarray.DataArray (x: 2)>
array([0, 3])
Coordinates:
  * x        (x) int64 2 3
```

---

Yes, good point. What might be possible is to warn if selecting with a slice and the index is not monotonic increasing or decreasing.







","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1358960570
https://github.com/pydata/xarray/issues/6952#issuecomment-1225884104,https://api.github.com/repos/pydata/xarray/issues/6952,1225884104,IC_kwDOAMm_X85JEYHI,10194086,2022-08-24T15:30:37Z,2022-09-01T14:42:48Z,MEMBER,"Good point, that can be surprising. I think a warning could be added.

```python
if not set(self.obj.dims) & set(self.weights.dims):
    warnings.warn("""")
```

However, I wonder if that would be too noisy, e.g. if there is a scalar on the Dataset:

```python
xr.Dataset({""test_array"": test_array, ""scalar"": 1}).weighted(weights2).mean()
```

(could potentially skip scalars in the check).

---

Edit:

https://github.com/pydata/xarray/blob/790a444b11c244fd2d33e2d2484a590f8fc000ff/xarray/core/weighted.py#L192

may not be the right place, as it checks it on the Dataset level (and not on the DataArray level).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1349572787
https://github.com/pydata/xarray/pull/6966#issuecomment-1234066481,https://api.github.com/repos/pydata/xarray/issues/6966,1234066481,IC_kwDOAMm_X85Jjlwx,10194086,2022-09-01T10:15:58Z,2022-09-01T10:15:58Z,MEMBER,Should be uncontroversial - so I am merging this as well.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1355361572
https://github.com/pydata/xarray/pull/6965#issuecomment-1234065799,https://api.github.com/repos/pydata/xarray/issues/6965,1234065799,IC_kwDOAMm_X85JjlmH,10194086,2022-09-01T10:15:23Z,2022-09-01T10:15:23Z,MEMBER,I am merging this - will revert this if pydap publishes a new version on pypi.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1355349486
https://github.com/pydata/xarray/pull/6965#issuecomment-1231466666,https://api.github.com/repos/pydata/xarray/issues/6965,1231466666,IC_kwDOAMm_X85JZrCq,10194086,2022-08-30T10:20:13Z,2022-08-30T10:20:13Z,MEMBER,"Turns out pydap 3.3 (which fixes this problem) is [released on conda](https://anaconda.org/conda-forge/pydap) but [not on pypi](https://pypi.org/project/Pydap/) - I opened an issue on this pydap/pydap#268. However, I have no idea if & when they will fix this - so I suggest to merge this anyway & I can undo this change once it is fixed upstream.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1355349486
https://github.com/pydata/xarray/issues/6960#issuecomment-1231310755,https://api.github.com/repos/pydata/xarray/issues/6960,1231310755,IC_kwDOAMm_X85JZE-j,10194086,2022-08-30T08:10:13Z,2022-08-30T08:10:13Z,MEMBER,Turns out pydap 3.3 (which fixes this problem) is [released on conda](https://anaconda.org/conda-forge/pydap) but [not on pypi](https://pypi.org/project/Pydap/) - I opened an issue on this pydap/pydap#268 & also opened #6965 to work around this in the meantime,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1352920776
https://github.com/pydata/xarray/pull/6961#issuecomment-1230825078,https://api.github.com/repos/pydata/xarray/issues/6961,1230825078,IC_kwDOAMm_X85JXOZ2,10194086,2022-08-29T20:26:37Z,2022-08-29T20:26:37Z,MEMBER,"Thanks! This should merge on green. Also, I see that this is your first PR here - welcome to xarray!","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1353447485
https://github.com/pydata/xarray/issues/6960#issuecomment-1230475502,https://api.github.com/repos/pydata/xarray/issues/6960,1230475502,IC_kwDOAMm_X85JV5Du,10194086,2022-08-29T15:28:13Z,2022-08-29T15:28:13Z,MEMBER,"I think we could not install pydap if for python versions 3.10 and up:

```diff
-pydap
+pydap;python_version<""3.10""
```
in
https://github.com/pydata/xarray/blob/3d3b236df3f8f5982760e68e064eb0db2aacc4a2/setup.cfg#L87

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1352920776
https://github.com/pydata/xarray/issues/6953#issuecomment-1228461073,https://api.github.com/repos/pydata/xarray/issues/6953,1228461073,IC_kwDOAMm_X85JONQR,10194086,2022-08-26T13:03:04Z,2022-08-26T13:03:04Z,MEMBER,"It does work if the array keeps the size:

```python
data.resample(index=""M"").apply(lambda x: x.values)
```

As a workaround you could allow your function to consume a dummy axis. Or you could pass `dim` as `...`

```python
data.resample(index=""M"").reduce(lambda x, axis: 1) # workaround 1
data.resample(index=""M"").reduce(lambda x: 1, dim=...) # workaround 2
```

(`reduce` only passes `axis` if `dim is not None` but `groupby` passes the `group_dim` per default.

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1350803561
https://github.com/pydata/xarray/issues/6953#issuecomment-1227218693,https://api.github.com/repos/pydata/xarray/issues/6953,1227218693,IC_kwDOAMm_X85JJd8F,10194086,2022-08-25T12:53:32Z,2022-08-25T12:53:32Z,MEMBER,"`apply` seems to expect that the applied function returns a DataArray. As an alternative could you use `data.resample(index=""M"").reduce(np.median)`?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1350803561
https://github.com/pydata/xarray/pull/6944#issuecomment-1227155757,https://api.github.com/repos/pydata/xarray/issues/6944,1227155757,IC_kwDOAMm_X85JJOkt,10194086,2022-08-25T11:51:43Z,2022-08-25T11:51:43Z,MEMBER,This looks good - but from staring at the code it seems to me the logic is the same as before?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1345816120
https://github.com/pydata/xarray/issues/6932#issuecomment-1220654227,https://api.github.com/repos/pydata/xarray/issues/6932,1220654227,IC_kwDOAMm_X85IwbST,10194086,2022-08-19T13:03:56Z,2022-08-19T13:03:56Z,MEMBER,Thanks for noticing.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1343663760
https://github.com/pydata/xarray/pull/6910#issuecomment-1218108989,https://api.github.com/repos/pydata/xarray/issues/6910,1218108989,IC_kwDOAMm_X85Imt49,10194086,2022-08-17T14:44:58Z,2022-08-17T14:44:58Z,MEMBER,Any objections to merge this as is?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1337166287
https://github.com/pydata/xarray/pull/6910#issuecomment-1213269142,https://api.github.com/repos/pydata/xarray/issues/6910,1213269142,IC_kwDOAMm_X85IUQSW,10194086,2022-08-12T15:57:51Z,2022-08-12T15:57:51Z,MEMBER,"I also just realized, that we made many arguments keyword-only without deprecation (e.g. `xr.Dataset.mean`) - but that should not stop us from using this - there are still a lot of instances where it could be helpful.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1337166287
https://github.com/pydata/xarray/pull/6910#issuecomment-1213250165,https://api.github.com/repos/pydata/xarray/issues/6910,1213250165,IC_kwDOAMm_X85IULp1,10194086,2022-08-12T15:41:46Z,2022-08-12T15:51:24Z,MEMBER,"I just realized that there is a bug in the decorator for ""keyword-only arguments without a default"". I wonder if I should fix this or just disallow this pattern, i.e. the following does currently not work properly:

```python
@_deprecate_positional_args(""v0.1.0"")
def func(a, *, b):
    pass
```

but I am not sure how helpful it is.

EDIT: It now raises a `TypeError` for this case.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1337166287
https://github.com/pydata/xarray/pull/6910#issuecomment-1213248810,https://api.github.com/repos/pydata/xarray/issues/6910,1213248810,IC_kwDOAMm_X85IULUq,10194086,2022-08-12T15:40:46Z,2022-08-12T15:40:46Z,MEMBER,"> Are the functions you are considering using this functions that never had keyword arguments before? When I wrote a similar decorator before i had an explicit list of arguments that were allowed to be converted.

No, I want to consider arguments that have default values.

```python
def mean(dim, skipna=None, keep_attrs=None):
    pass

@_deprecate_positional_args(""v0.1.0"")
def mean(dim, *, skipna=None, keep_attrs=None):
    pass
```

Or do I missunderstand your question?

> Do you think that you can get it to work with static typing?

I think `functools.wraps` also attaches the annotations?



","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1337166287
https://github.com/pydata/xarray/issues/5531#issuecomment-1213078538,https://api.github.com/repos/pydata/xarray/issues/5531,1213078538,IC_kwDOAMm_X85IThwK,10194086,2022-08-12T12:51:30Z,2022-08-12T12:51:30Z,MEMBER,"I just opened #6910 - feedback welcome.


> These decorators are kinda fun to write and are quite taylored to a certain release philosophy.
> It might be warranted to just write your own ;)

I am glad that's fine for you.




","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,929840699
https://github.com/pydata/xarray/issues/5531#issuecomment-1211959725,https://api.github.com/repos/pydata/xarray/issues/5531,1211959725,IC_kwDOAMm_X85IPQmt,10194086,2022-08-11T13:02:19Z,2022-08-11T13:02:31Z,MEMBER,"I just realized that @hmaarrfk's decorator works similarly, but it also has some bells and whistles we probably don't need..?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,929840699
https://github.com/pydata/xarray/issues/5531#issuecomment-1211288085,https://api.github.com/repos/pydata/xarray/issues/5531,1211288085,IC_kwDOAMm_X85IMsoV,10194086,2022-08-10T21:20:32Z,2022-08-10T21:20:32Z,MEMBER,"I just discovered the scikit-learns decorator to deprecate positional args - see https://github.com/scikit-learn/scikit-learn/pull/13311 - and now have a preference for this one. It seems the simplest and does not need any input as it reads the keyword-only args from the signature (could potentially add the version of the deprecation).

```python
@_deprecate_positional_args
def f1(a, b, *, c=1, d=1):
    pass
```

and at the end of the deprecation period you only need to do

```diff
-@_deprecate_positional_args
def f1(a, b, *, c=1, d=1):
    pass
```





","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,929840699
https://github.com/pydata/xarray/issues/6726#issuecomment-1200279262,https://api.github.com/repos/pydata/xarray/issues/6726,1200279262,IC_kwDOAMm_X85His7e,10194086,2022-07-30T19:12:06Z,2022-07-30T19:12:20Z,MEMBER,"I just had another look at this using
```bash
python -X importtime -c ""import llvmlite"" 2> import.log
```
and [tuna](https://github.com/nschloe/tuna) for the visualization.

- pseudoNETCDF adds quite some overhead, but I think only few people have this installed (could be made faster, but not sure if worth it)
- llmvlite (required by numba) seems the last dependency relying on pkg_resources but this is fixed in the new version which [should be out soonish](https://github.com/conda-forge/llvmlite-feedstock/pull/62)  
- dask recently merged a PR that avoids a slow import dask/dask/pull/9230 (from which we should profit)

This should bring it down a bit by another 0.25 s, but I agree it would be nice to have it even lower.


","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1284475176
https://github.com/pydata/xarray/issues/6828#issuecomment-1196413171,https://api.github.com/repos/pydata/xarray/issues/6828,1196413171,IC_kwDOAMm_X85HT9Dz,10194086,2022-07-27T08:22:25Z,2022-07-27T08:22:25Z,MEMBER,Yes good point - just calling compute may be the better solution.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1318369110
https://github.com/pydata/xarray/issues/6828#issuecomment-1195744976,https://api.github.com/repos/pydata/xarray/issues/6828,1195744976,IC_kwDOAMm_X85HRZ7Q,10194086,2022-07-26T17:02:50Z,2022-07-26T17:02:50Z,MEMBER,"Thanks for your report. I think the issue is that dask cannot correctly infer the dtype of the result - or at least not it's length (maybe because it does not do value-based casting? not sure).

As a workaround you could do an intermediate cast to an object:

```python
dac.astype(object).str.cat(dac, sep='--').astype(""U"").compute()
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1318369110
https://github.com/pydata/xarray/pull/6794#issuecomment-1187368511,https://api.github.com/repos/pydata/xarray/issues/6794,1187368511,IC_kwDOAMm_X85Gxc4_,10194086,2022-07-18T13:04:45Z,2022-07-18T13:04:45Z,MEMBER,Thanks @DimitriPapadopoulos - for reference #6316.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1306850342
https://github.com/pydata/xarray/pull/6774#issuecomment-1182474867,https://api.github.com/repos/pydata/xarray/issues/6774,1182474867,IC_kwDOAMm_X85GeyJz,10194086,2022-07-12T20:33:12Z,2022-07-12T20:33:12Z,MEMBER,Thanks @jsignell! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1301237961
https://github.com/pydata/xarray/pull/6730#issuecomment-1180346845,https://api.github.com/repos/pydata/xarray/issues/6730,1180346845,IC_kwDOAMm_X85GWqnd,10194086,2022-07-11T12:25:57Z,2022-07-11T12:25:57Z,MEMBER,I renamed the fixtures back to `da` & `ds` to make the PR smaller & will merge once the checks are green... ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1285767883