id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 594669577,MDU6SXNzdWU1OTQ2Njk1Nzc=,3937,"compose weighted with groupby, coarsen, resample, rolling etc.",10194086,open,0,,,7,2020-04-05T22:00:40Z,2023-07-27T18:10:10Z,,MEMBER,,,,"It would be nice to make `weighted` work with `groupby` - e.g. [#3935 (comment)](https://github.com/pydata/xarray/pull/3935/files#r403742055) However, it is not entirely clear to me how that should be done. One way would be to do: ```python da.groupby(...).weighted(weights).mean() ``` this would require that the `groupby` operation is applied over the `weights` (how would this be done?) Or should it be ```python da.weighted(weights).groupby(...).mean() ``` but this seems less intuitive to me. Or ```python da.groupby(..., weights=weights).mean() ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3937/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 975385095,MDU6SXNzdWU5NzUzODUwOTU=,5721,pandas deprecates Index.get_loc with method,10194086,closed,0,,,7,2021-08-20T08:24:16Z,2022-01-27T21:06:40Z,2022-01-27T21:06:40Z,MEMBER,,,,"pandas deprecates the `method` keyword in `Index.get_loc`, see pandas-dev/pandas#42269. Therefore we end up with about 5000 warnings in our upstream tests: `FutureWarning: Passing method to Index.get_loc is deprecated and will raise in a future version. Use index.get_indexer([item], method=...) instead` We should fix this before pandas releases because the warning will not be silent (`FutureWarning`) or ask pandas to give us more time and use a `DeprecationWarning` at the moment.
We use this here: https://github.com/pydata/xarray/blob/4bb9d9c6df77137f05e85c7cc6508fe7a93dc0e4/xarray/core/indexes.py#L233-L235 Is this only ever called with one item? Then we might be able to use ```python indexer = self.index.get_indexer( [label_value], method=method, tolerance=tolerance ).item() if indexer == -1: raise KeyError(label_value) ``` --- https://github.com/pydata/xarray/blob/3956b73a7792f41e4410349f2c40b9a9a80decd2/xarray/core/missing.py#L571-L572 This one could be easy to fix (replace with `imin = index.get_indexer([minval], method=""nearest"").item()`) --- It is also defined in `CFTimeIndex`, which complicates things: https://github.com/pydata/xarray/blob/eea76733770be03e78a0834803291659136bca31/xarray/coding/cftimeindex.py#L461-L466 because `get_indexer` expects an iterable and thus the `if isinstance(key, str)` test no longer works.
@benbovy @spencerkclark ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5721/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 407864596,MDU6SXNzdWU0MDc4NjQ1OTY=,2754,silence warning for decode_cf_datetime?,10194086,closed,0,,,7,2019-02-07T19:38:38Z,2019-02-19T20:47:26Z,2019-02-19T20:47:26Z,MEMBER,,,,"#### Code Sample, a copy-pastable example if possible ```python import xarray as xr import numpy as np x = np.arange(100) * 365 x = xr.coding.times.decode_cf_datetime(x, 'days since 2400-01-01', calendar='proleptic_gregorian') ``` #### Problem description xarray still throws an error when decoding out-of-bounds dates for proleptic_gregorian - should this be silenced? #### Output of ``xr.show_versions()``
# Paste the output here xr.show_versions() here NSTALLED VERSIONS ------------------ commit: None python: 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 18:33:04) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.4.172-86-default machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.2 xarray: 0.11.3 pandas: 0.24.1 numpy: 1.16.1 scipy: 1.2.0 netCDF4: 1.4.2 pydap: None h5netcdf: 0.6.2 h5py: 2.9.0 Nio: None zarr: None cftime: 1.0.3.4 PseudonetCDF: None rasterio: 1.0.17 cfgrib: None iris: None bottleneck: 1.2.1 cyordereddict: None dask: 1.1.1 distributed: 1.25.3 matplotlib: 3.0.2 cartopy: 0.17.0 seaborn: 0.9.0 setuptools: 40.7.3 pip: 19.0.1 conda: None pytest: 4.2.0 IPython: 7.2.0 sphinx: 1.8.4
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2754/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue