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/pull/7173#issuecomment-1280906370,https://api.github.com/repos/pydata/xarray/issues/7173,1280906370,IC_kwDOAMm_X85MWRSC,14371165,2022-10-17T13:57:47Z,2024-03-20T23:12:49Z,MEMBER,"**Scatter vs. Lines:** ![image](https://user-images.githubusercontent.com/14371165/196196043-2485945e-29d7-4ff8-9321-3faca68d0dae.png)
```python ds = xr.tutorial.scatter_example_dataset(seed=42) hue_ = ""y"" x_ = ""y"" size_=""y"" z_ = ""z"" fig = plt.figure() ax = fig.add_subplot(1, 2, 1, projection='3d') ds.A.sel(w=""one"").plot.lines(x=x_, z=z_, hue=hue_, linewidth=size_, ax=ax) ax = fig.add_subplot(1, 2, 2, projection='3d') ds.A.sel(w=""one"").plot.scatter(x=x_, z=z_, hue=hue_, markersize=size_, ax=ax) ```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1410608825 https://github.com/pydata/xarray/issues/1303#issuecomment-285380106,https://api.github.com/repos/pydata/xarray/issues/1303,285380106,MDEyOklzc3VlQ29tbWVudDI4NTM4MDEwNg==,1197350,2017-03-09T15:18:18Z,2024-02-06T17:57:21Z,MEMBER,Just wanted to link to a somewhat related discussion happening in [brian-rose/climlab#50](https://github.com/climlab/climlab/issues/50).,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,213004586 https://github.com/pydata/xarray/issues/4601#issuecomment-732361140,https://api.github.com/repos/pydata/xarray/issues/4601,732361140,MDEyOklzc3VlQ29tbWVudDczMjM2MTE0MA==,5635139,2020-11-23T19:00:30Z,2023-09-24T19:44:17Z,MEMBER,"Great observation @mathause . I think there are two parts of this: - Do we want other libraries which do `da.longitude` to raise a mypy error? That may be a tradeoff with raising the true error on `da.isel` - How do we design the type hierarchy? We could add methods to `DataWithCoords` or add some `Dataset_Or_DataArray`-like type Having methods like `isel` typed would be a win I think","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748684119 https://github.com/pydata/xarray/issues/4601#issuecomment-732472373,https://api.github.com/repos/pydata/xarray/issues/4601,732472373,MDEyOklzc3VlQ29tbWVudDczMjQ3MjM3Mw==,5635139,2020-11-23T22:51:38Z,2023-09-24T19:36:02Z,MEMBER,"Good point re accessors, I hadn't considered those. So sounds like raising an error on `da.isel` isn't possible regardless...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748684119 https://github.com/pydata/xarray/issues/6293#issuecomment-1259228475,https://api.github.com/repos/pydata/xarray/issues/6293,1259228475,IC_kwDOAMm_X85LDk07,4160723,2022-09-27T09:22:04Z,2023-08-24T11:42:53Z,MEMBER,"Following thoughts and discussions in various issues (e.g., #6836), I'd like to suggest another section to the ones in the top comment: ## Deprecate `pandas.MultiIndex` special cases in Xarray - remove the multi-index “dimension” coordinate (tuple elements) - do not automatically promote `pandas.MultiIndex` objects as dimension + level coordinates, e.g., like in `xr.Dataset(coords={“x”: pd_midx})` but instead treat it as a single duck-array. - do not accept `pandas.MultiIndex` as `dim` argument in `xarray.concat()` (#7148) - remove `obj.to_index()` for all xarray objects? - (EDIT) remove `Dataset.reset_index()` and `DataArray.reset_index()` They are source of many problems and complexities in Xarray internals (many regressions reported since the index refactor were related to those special cases) and I'm not sure that the value they add is really worth the trouble. Also, in the long term the special treatment of `PandasMultiIndex` vs. other Xarray multi-indexes may add some confusion. Some of those features are widely used (e.g., the creation of Dataset / DataArray from pandas multi-indexes is used in many places in unit tests), so we would need convenient alternatives and a smooth transition. ","{""total_count"": 5, ""+1"": 5, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1148021907 https://github.com/pydata/xarray/pull/7862#issuecomment-1578775636,https://api.github.com/repos/pydata/xarray/issues/7862,1578775636,IC_kwDOAMm_X85eGjRU,5821660,2023-06-06T13:30:15Z,2023-06-06T13:30:15Z,MEMBER,"> > Might be worth an issue over at numpy with the example from the test. > > [numpy/numpy#23886](https://github.com/numpy/numpy/issues/23886) The issue is already resolved over at numpy which is really great! It was also marked as backport. @headtr1ck How are these issues resolved currently or how do we track removing the ignore?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/pull/7862#issuecomment-1578248748,https://api.github.com/repos/pydata/xarray/issues/7862,1578248748,IC_kwDOAMm_X85eEios,5821660,2023-06-06T09:04:39Z,2023-06-06T09:04:39Z,MEMBER,"> Might be worth an issue over at numpy with the example from the test. https://github.com/numpy/numpy/issues/23886","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/pull/7888#issuecomment-1577838062,https://api.github.com/repos/pydata/xarray/issues/7888,1577838062,IC_kwDOAMm_X85eC-Xu,2448579,2023-06-06T03:20:39Z,2023-06-06T03:20:39Z,MEMBER,Should we delete the cfgrib example instead?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1736542260 https://github.com/pydata/xarray/issues/7841#issuecomment-1577827466,https://api.github.com/repos/pydata/xarray/issues/7841,1577827466,IC_kwDOAMm_X85eC7yK,2448579,2023-06-06T03:05:47Z,2023-06-06T03:05:47Z,MEMBER,https://github.com/corteva/rioxarray/issues/676,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1709215291 https://github.com/pydata/xarray/issues/7894#issuecomment-1577474914,https://api.github.com/repos/pydata/xarray/issues/7894,1577474914,IC_kwDOAMm_X85eBlti,2448579,2023-06-05T21:05:47Z,2023-06-05T21:05:57Z,MEMBER,"> but is it not possible for it to calculate the integrated values where there were regular values? @chfite Can you provide an example of what you would want it to do please","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1742035781 https://github.com/pydata/xarray/issues/7866#issuecomment-1576080083,https://api.github.com/repos/pydata/xarray/issues/7866,1576080083,IC_kwDOAMm_X85d8RLT,5821660,2023-06-05T05:45:30Z,2023-06-05T05:45:30Z,MEMBER,"@vrishk Sorry for the delay here and thanks for bringing this to attention. We now have at least two requests which might move this forward (moving `ensure_dtype_not_object` into the backends). But this would need some discussion first, how to do this.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720924071 https://github.com/pydata/xarray/issues/7892#issuecomment-1576074048,https://api.github.com/repos/pydata/xarray/issues/7892,1576074048,IC_kwDOAMm_X85d8PtA,5821660,2023-06-05T05:37:32Z,2023-06-05T05:37:32Z,MEMBER,@mktippett Thanks for raising this. The issue should be cleared after #7888 is merged.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1740685974 https://github.com/pydata/xarray/pull/7891#issuecomment-1575756825,https://api.github.com/repos/pydata/xarray/issues/7891,1575756825,IC_kwDOAMm_X85d7CQZ,14371165,2023-06-04T22:29:18Z,2023-06-04T22:29:18Z,MEMBER,You could use `DataArray.round` to round to significant decimals.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1740268634 https://github.com/pydata/xarray/pull/7889#issuecomment-1575671448,https://api.github.com/repos/pydata/xarray/issues/7889,1575671448,IC_kwDOAMm_X85d6taY,13301940,2023-06-04T18:46:09Z,2023-06-04T18:46:09Z,MEMBER,Thank you @keewis ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1738586208 https://github.com/pydata/xarray/issues/7890#issuecomment-1574365471,https://api.github.com/repos/pydata/xarray/issues/7890,1574365471,IC_kwDOAMm_X85d1ukf,2448579,2023-06-02T22:04:33Z,2023-06-02T22:04:33Z,MEMBER,"I think the only other one is dask, which *should* also work.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1738835134 https://github.com/pydata/xarray/issues/7890#issuecomment-1574331034,https://api.github.com/repos/pydata/xarray/issues/7890,1574331034,IC_kwDOAMm_X85d1mKa,2448579,2023-06-02T21:23:25Z,2023-06-02T21:27:06Z,MEMBER,"This seems like a real easy fix? ``` axis = tuple(self.get_axis_num(d) for d in dim) ``` EDIT: the Array API seems to type `axis` as `Optional[Union[int, Tuple[int, ...]]]` pretty consistently, so it seems like we should always pass tuples down to the array library","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1738835134 https://github.com/pydata/xarray/pull/7862#issuecomment-1574264842,https://api.github.com/repos/pydata/xarray/issues/7862,1574264842,IC_kwDOAMm_X85d1WAK,2448579,2023-06-02T20:14:33Z,2023-06-02T20:14:48Z,MEMBER,"> xarray/tests/test_coding_strings.py:36: error: No overload variant of ""dtype"" matches argument types ""str"", ""Dict[str, Type[str]]"" [call-overload] cc @Illviljan @headtr1ck ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/pull/7880#issuecomment-1572412059,https://api.github.com/repos/pydata/xarray/issues/7880,1572412059,IC_kwDOAMm_X85duRqb,1217238,2023-06-01T16:51:07Z,2023-06-01T17:10:49Z,MEMBER,"Given that this error only is caused when Python is shutting down, which is exactly a case in which we do _not_ need to clean up open file objects, maybe we can remove the `__del__` instead? Something like: ```python import atexit @atexit.register def _remove_del_method(): # We don't need to close unclosed files at program exit, # and may not be able to do, because Python is cleaning up # imports. del CachingFileManager.__del__ ``` (I have not tested this!)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/pull/7880#issuecomment-1572437423,https://api.github.com/repos/pydata/xarray/issues/7880,1572437423,IC_kwDOAMm_X85duX2v,14808389,2023-06-01T17:01:56Z,2023-06-01T17:06:06Z,MEMBER,"that appears to work on both my laptop and my local HPC, and is arguably a lot easier to implement / understand as we don't need to make sure all the globals we use are still available (which in this case would be `acquire`, `OPTIONS`, `warnings`, and `RuntimeWarning`). Edit: let me change the PR to do that instead","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/pull/7880#issuecomment-1572384036,https://api.github.com/repos/pydata/xarray/issues/7880,1572384036,IC_kwDOAMm_X85duK0k,14808389,2023-06-01T16:38:23Z,2023-06-01T16:54:08Z,MEMBER,"> Have you verfied that this fixes things at least on your machine? I thought I did, but apparently something changed: right now it fails because `OPTIONS` is not available anymore, so we might have to add a reference to that, as well. Additionally, for the warning we use `warnings.warn` and `RuntimeWarning` that might also have disappeared already (but those are standard library / builtins, so hopefully not?) In any case, you can verify this, too: - create a new environment using `mamba create -n test python=3.11 numpy pandas packaging pooch netcdf4` and activate it - run `pip install 'dask[array]'` to install `dask` without `distributed` (this appears to make a difference for me, not sure if that's the same elsewhere) - editable-install `xarray` so we can easily switch between branches - run `python -c 'import xarray as xr; ds = xr.tutorial.open_dataset(""air_temperature"", chunks={})'` This should print an error for `main` and shouldn't with this branch (confirmed on my local HPC).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/pull/7880#issuecomment-1572363440,https://api.github.com/repos/pydata/xarray/issues/7880,1572363440,IC_kwDOAMm_X85duFyw,14808389,2023-06-01T16:26:42Z,2023-06-01T16:26:42Z,MEMBER,"the issue is that this doesn't occur on normal garbage collection but only on interpreter shutdown. So really, I don't think we have any way to test this using `pytest` as that itself is written in python (unless of course we can make use of sub-interpreters, but that might be more trouble than it's worth).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/pull/7880#issuecomment-1572350143,https://api.github.com/repos/pydata/xarray/issues/7880,1572350143,IC_kwDOAMm_X85duCi_,1217238,2023-06-01T16:16:40Z,2023-06-01T16:16:40Z,MEMBER,"I agree that this seems very hard to test! Have you verfied that this fixes things at least on your machine?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/pull/7883#issuecomment-1572306481,https://api.github.com/repos/pydata/xarray/issues/7883,1572306481,IC_kwDOAMm_X85dt34x,2448579,2023-06-01T15:49:42Z,2023-06-01T15:49:42Z,MEMBER,Hmmm [ndim is in the array api](https://data-apis.org/array-api/latest/API_specification/array_object.html#attributes) so potentially we could just update the test.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1731320789 https://github.com/pydata/xarray/issues/7884#issuecomment-1572276996,https://api.github.com/repos/pydata/xarray/issues/7884,1572276996,IC_kwDOAMm_X85dtwsE,2448579,2023-06-01T15:30:26Z,2023-06-01T15:30:26Z,MEMBER,Please ask over at the cfgrib repo. But it does look like a bad environment / bad install.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1732510720 https://github.com/pydata/xarray/pull/7862#issuecomment-1572021301,https://api.github.com/repos/pydata/xarray/issues/7862,1572021301,IC_kwDOAMm_X85dsyQ1,5821660,2023-06-01T13:06:32Z,2023-06-01T13:06:32Z,MEMBER,"@tomwhite I've added tests to check the backend code for vlen string dtype metadadata. Also had to add specific check for the h5py vlen string metadata. I think we've covered everything for the proposed change to allow empty vlen strings dtype metadata. I'm looking at the mypy error and do not have the slightest clue what and where to change. Any help appreciated. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/issues/7887#issuecomment-1571698855,https://api.github.com/repos/pydata/xarray/issues/7887,1571698855,IC_kwDOAMm_X85drjin,14808389,2023-06-01T09:39:09Z,2023-06-01T09:39:09Z,MEMBER,"this is #7879 (and thus probably #7079). I suspect our locks are not working properly, but in any case we really should try to fix this.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1735219849 https://github.com/pydata/xarray/issues/7884#issuecomment-1570587416,https://api.github.com/repos/pydata/xarray/issues/7884,1570587416,IC_kwDOAMm_X85dnUMY,14808389,2023-05-31T16:56:16Z,2023-05-31T16:58:23Z,MEMBER,"> No module named '_cffi_backend' Does simply `import cfgrib` work for you? I suspect it doesn't, which would explain the issue. It's unfortunate that the error is rewritten to ""unknown engine"", but I'm not sure how we would detect that it's a dependency that fails.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1732510720 https://github.com/pydata/xarray/pull/7821#issuecomment-1570164833,https://api.github.com/repos/pydata/xarray/issues/7821,1570164833,IC_kwDOAMm_X85dltBh,14371165,2023-05-31T12:43:30Z,2023-05-31T12:43:30Z,MEMBER,Thanks @mgunyho !,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1698626185 https://github.com/pydata/xarray/issues/7884#issuecomment-1569021273,https://api.github.com/repos/pydata/xarray/issues/7884,1569021273,IC_kwDOAMm_X85dhV1Z,14808389,2023-05-30T20:07:31Z,2023-05-30T20:08:04Z,MEMBER,"No, this should still work: ```sh conda create -n test -c conda-forge xarray ipython python=3.11 cfgrib pooch conda activate test ipython ``` ```python import xarray as xr xr.tutorial.open_dataset(""era5-2mt-2019-03-uk.grib"") ``` We somewhat recently dropped the builtin `cfgrib` engine in favor of the one provided by the `cfgrib` package (and that is also the reason why the example in the docs fails: `cfgrib` is not installed into the docs environment anymore, which is definitely an oversight). Which version of `cfgrib` do you have? For reference, in the environment built with the command above I have `cfgrib=0.9.10.3`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1732510720 https://github.com/pydata/xarray/pull/7876#issuecomment-1568728602,https://api.github.com/repos/pydata/xarray/issues/7876,1568728602,IC_kwDOAMm_X85dgOYa,14808389,2023-05-30T16:25:25Z,2023-05-30T16:25:25Z,MEMBER,"great, thanks for the confirmation!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1729709527 https://github.com/pydata/xarray/issues/7884#issuecomment-1568726002,https://api.github.com/repos/pydata/xarray/issues/7884,1568726002,IC_kwDOAMm_X85dgNvy,14808389,2023-05-30T16:23:30Z,2023-05-30T16:23:30Z,MEMBER,"as stated by the exception, the `cfgrib` engine is unknown, which usually means you're missing the `cfgrib` package (or this is a environment issue). If you did indeed install it, can you post the output of either `conda list` or `pip list` (in case you're not using `conda`)?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1732510720 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/pull/7880#issuecomment-1567446747,https://api.github.com/repos/pydata/xarray/issues/7880,1567446747,IC_kwDOAMm_X85dbVbb,14808389,2023-05-29T19:22:12Z,2023-05-29T19:22:12Z,MEMBER,"> I would have thought that the global (or module level here) variable/function aquire should have at least one reference until after the deletion of the object. I think this is intended (though certainly not very easy to get right): see the second part of the [warning in the `__del__` documentation](https://docs.python.org/3/reference/datamodel.html#object.__del__).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352 https://github.com/pydata/xarray/issues/7879#issuecomment-1567366415,https://api.github.com/repos/pydata/xarray/issues/7879,1567366415,IC_kwDOAMm_X85dbB0P,14808389,2023-05-29T17:22:09Z,2023-05-29T17:22:09Z,MEMBER,"If I'm reading the different issues correctly, that means this is a duplicate of #7079","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730451312 https://github.com/pydata/xarray/issues/2697#issuecomment-1567154608,https://api.github.com/repos/pydata/xarray/issues/2697,1567154608,IC_kwDOAMm_X85daOGw,14808389,2023-05-29T13:41:37Z,2023-05-29T13:41:37Z,MEMBER,"closing, since anything still missing should be feature requests for `xncml`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,401874795 https://github.com/pydata/xarray/issues/893#issuecomment-1567147143,https://api.github.com/repos/pydata/xarray/issues/893,1567147143,IC_kwDOAMm_X85daMSH,14808389,2023-05-29T13:33:58Z,2023-05-29T13:34:49Z,MEMBER,I think this has been fixed by `xncml` and/or `kerchunk`.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,163267018 https://github.com/pydata/xarray/pull/7827#issuecomment-1567109753,https://api.github.com/repos/pydata/xarray/issues/7827,1567109753,IC_kwDOAMm_X85daDJ5,6628425,2023-05-29T13:00:30Z,2023-05-29T13:00:30Z,MEMBER,"One other tricky edge case that occurs to me is one where an extreme fill value (e.g. `1e30`) is used for floating point fields. If we decode the times first, it might appear that the dates cannot be represented as nanosecond-precision values, but in reality they would be. We may need to think more about how to handle this edge case in addition to #7817.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1700227455 https://github.com/pydata/xarray/issues/7814#issuecomment-1567037851,https://api.github.com/repos/pydata/xarray/issues/7814,1567037851,IC_kwDOAMm_X85dZxmb,14808389,2023-05-29T11:53:37Z,2023-05-29T12:10:00Z,MEMBER,"Actually, it goes away with `pip install jinja2`. We don't use `jinja2` at all, so either this is some kind of weird effect on garbage collection (a timing issue?), or `dask` is doing something differently as soon as `jinja2` is available. Edit: most likely this is a timing issue... the offending line tries to make use of the internal `acquire` function, which I think at that point has already been destroyed. To fix that, I think we need to somehow store a reference on the file manager?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906 https://github.com/pydata/xarray/issues/7814#issuecomment-1567025628,https://api.github.com/repos/pydata/xarray/issues/7814,1567025628,IC_kwDOAMm_X85dZunc,14808389,2023-05-29T11:41:06Z,2023-05-29T11:56:20Z,MEMBER,"I *can* reproduce this locally: - download and unpack the files from https://github.com/pydata/xarray/issues/7814#issuecomment-1535168128 - use `mamba create -n test python=3.11 xarray netcdf4` to create the environment (note: no `dask`) - use `pip install ""dask[array]""` to install `dask` (does not pull `distributed` like the package from `conda-forge`) - put the code into a script and execute it For reference, the full traceback is: ```pytb Exception ignored in: Traceback (most recent call last): File ""/home/jmagin/.local/opt/mambaforge/envs/test/lib/python3.9/site-packages/xarray/backends/file_manager.py"", line 246, in __del__ TypeError: 'NoneType' object is not callable ``` As far as I can tell, this means we're using something from `distributed` with a broken fallback, since the error goes away as soon as I *install* `distributed`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906 https://github.com/pydata/xarray/pull/7875#issuecomment-1563788348,https://api.github.com/repos/pydata/xarray/issues/7875,1563788348,IC_kwDOAMm_X85dNYQ8,14371165,2023-05-26T04:17:07Z,2023-05-26T04:18:08Z,MEMBER,"`cos` is a float operation so I would lean towards using a isclose-check: `xr.testing.assert_allclose(a + 1, np.cos(a))`.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1726529405 https://github.com/pydata/xarray/issues/7856#issuecomment-1563092362,https://api.github.com/repos/pydata/xarray/issues/7856,1563092362,IC_kwDOAMm_X85dKuWK,14808389,2023-05-25T15:19:26Z,2023-05-25T15:19:26Z,MEMBER,"how did you set up your environment? This works for me: ```sh mamba create -n test python=3.11 xarray dask netcdf4 pooch ipython mamba activate test ipython ``` ```python xr.tutorial.open_dataset(""rasm"", chunks={}) ``` Interestingly enough, though, is that you should only see this with `xarray=2023.5.0`, while your environment claims to have `xarray=2023.4.2`. It seems there is something wrong with your environment?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 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/7870#issuecomment-1562637946,https://api.github.com/repos/pydata/xarray/issues/7870,1562637946,IC_kwDOAMm_X85dI_Z6,14808389,2023-05-25T10:07:35Z,2023-05-25T10:07:35Z,MEMBER,"I agree, this change should be fine.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722614979 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/7868#issuecomment-1561584592,https://api.github.com/repos/pydata/xarray/issues/7868,1561584592,IC_kwDOAMm_X85dE-PQ,5821660,2023-05-24T16:50:34Z,2023-05-24T16:50:34Z,MEMBER,"Thanks @ghiggi for your comment. The problem is we have at least two contradicting user requests here, see #7328 and #7862. I'm sure there is a solution to accommodate both sides. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722417436 https://github.com/pydata/xarray/issues/7870#issuecomment-1561543105,https://api.github.com/repos/pydata/xarray/issues/7870,1561543105,IC_kwDOAMm_X85dE0HB,35968931,2023-05-24T16:31:30Z,2023-05-24T16:31:30Z,MEMBER,"Thanks for raising this @vhaasteren ! We want to do what we can to support users from all fields of science :) I would be okay with that change (especially as it's not really special-casing pint-pulsar, so much as generalizing an existing error-catching mechanism), but would defer to the opinion of @keewis on this.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722614979 https://github.com/pydata/xarray/issues/7856#issuecomment-1561504841,https://api.github.com/repos/pydata/xarray/issues/7856,1561504841,IC_kwDOAMm_X85dEqxJ,35968931,2023-05-24T16:16:41Z,2023-05-24T16:26:15Z,MEMBER,"### **Solution for those who just found this issue**: Just re-install xarray. `pip install -e .` is sufficient. Re-installing any way through pip/conda should register the dask chunkmanager entrypoint. --- @Illviljan I brought this up in the xarray team call today and we decided that since this only affects people who have previously cloned the xarray repository, are using a development install, and then updated by pulling changes from main; this problem only affects maybe ~10-20 people worldwide, all of whom are developers who are equipped to quickly solve it. I'm going to add a note into the what's new entry for this version now - if you think we need to do more then let me know. EDIT: I added a note to whatsnew in https://github.com/pydata/xarray/commit/69445c62953958488a6b35fafd8b9cfd6c0374a5, and updated the [release notes](https://github.com/pydata/xarray/releases/tag/v2023.05.0).","{""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7873#issuecomment-1561302572,https://api.github.com/repos/pydata/xarray/issues/7873,1561302572,IC_kwDOAMm_X85dD5Ys,2443309,2023-05-24T14:47:56Z,2023-05-24T14:47:56Z,MEMBER,"We dropped Python 3.8 support prior to the Pandas 2 release and have no plans to backport support at this time. xref: #7765","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,1724137371 https://github.com/pydata/xarray/pull/7862#issuecomment-1561285499,https://api.github.com/repos/pydata/xarray/issues/7862,1561285499,IC_kwDOAMm_X85dD1N7,5821660,2023-05-24T14:37:58Z,2023-05-24T14:37:58Z,MEMBER,"Thanks for trying. I can't think of any downsides for the netcdf4-fix, as it just adds the needed metadata to the object-dtype. But you never know, so it would be good to get another set of eyes on it. So it looks like the changes here with the fix in my branch will get your issue resolved @tomwhite, right? I'm a bit worried, that this might break other users workflows, if they depend on the current conversion to floating point for some reason. Also other backends might rely on this feature. Especially because this has been there since the early days when xarray was known as xray. @dcherian What would be the way to go here? There is also a somehow contradicting issue in #7868.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/issues/7868#issuecomment-1561214028,https://api.github.com/repos/pydata/xarray/issues/7868,1561214028,IC_kwDOAMm_X85dDjxM,5821660,2023-05-24T13:58:16Z,2023-05-24T13:58:16Z,MEMBER,"My main question here is, why is dask not trying to retrieve the object types from dtype.metadata? Or does it and fail for some reason?.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722417436 https://github.com/pydata/xarray/pull/7862#issuecomment-1561195832,https://api.github.com/repos/pydata/xarray/issues/7862,1561195832,IC_kwDOAMm_X85dDfU4,5821660,2023-05-24T13:52:04Z,2023-05-24T13:52:04Z,MEMBER,"@tomwhite I've put a commit with changes to zarr/netcdf4-backends which should preserve the dtype metadata here: https://github.com/kmuehlbauer/xarray/tree/preserve-vlen-string-dtype. I'm not really sure if that is the right location, but as it was already present that location at netcdf4-backend I think it will do.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/issues/5644#issuecomment-1561173824,https://api.github.com/repos/pydata/xarray/issues/5644,1561173824,IC_kwDOAMm_X85dDZ9A,2448579,2023-05-24T13:39:30Z,2023-05-24T13:39:30Z,MEMBER,Do you know where the in-place modification is happening? We could just copy there and fix this particular issue.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,955043280 https://github.com/pydata/xarray/pull/7862#issuecomment-1561162311,https://api.github.com/repos/pydata/xarray/issues/7862,1561162311,IC_kwDOAMm_X85dDXJH,5821660,2023-05-24T13:32:26Z,2023-05-24T13:32:57Z,MEMBER,"@tomwhite Special casing on netcdf4 backend should be possible, too. But it might need fixing at zarr backend, too: ```python ds = xr.Dataset({""a"": np.array([], dtype=xr.coding.strings.create_vlen_dtype(str))}) print(f""dtype: {ds['a'].dtype}"") print(f""metadata: {ds['a'].dtype.metadata}"") ds.to_zarr(""a.zarr"") print(""\n### Loading ###"") with xr.open_dataset(""a.zarr"", engine=""zarr"") as ds: print(f""dtype: {ds['a'].dtype}"") print(f""metadata: {ds['a'].dtype.metadata}"") ``` ```python dtype: object metadata: {'element_type': } ### Loading ### dtype: object metadata: None ``` Could you verify the above example, please? I'm relatively new to `zarr` :grimacing: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 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/7868#issuecomment-1560674198,https://api.github.com/repos/pydata/xarray/issues/7868,1560674198,IC_kwDOAMm_X85dBf-W,5821660,2023-05-24T08:27:11Z,2023-05-24T08:27:11Z,MEMBER,"@ghiggi Glad it works, but we still have to check if that is the correct location for the fix, as it's not CF specific. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722417436 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/pull/7862#issuecomment-1560559426,https://api.github.com/repos/pydata/xarray/issues/7862,1560559426,IC_kwDOAMm_X85dBD9C,5821660,2023-05-24T07:01:44Z,2023-05-24T07:01:44Z,MEMBER,"Thanks @tomwhite for the PR. I've only quickly checked the approach, which looks reasonable. But those changes have implications on several locations of the backend code, which we would have to sort out. Considering this example: ```python import numpy as np import xarray as xr print(f""creating dataset with empty string array"") print(""-----------------------------------------"") dtype = xr.coding.strings.create_vlen_dtype(str) ds = xr.Dataset({""a"": np.array([], dtype=dtype)}) print(f""dtype: {ds['a'].dtype}"") print(f""metadata: {ds['a'].dtype.metadata}"") ds.to_netcdf(""a.nc"", engine=""netcdf4"") print(""\nncdump"") print(""-------"") !ncdump a.nc engines = [""netcdf4"", ""h5netcdf""] for engine in engines: with xr.open_dataset(""a.nc"", engine=engine) as ds: print(f""\nloading with {engine}"") print(""-------------------"") print(f""dtype: {ds['a'].dtype}"") print(f""metadata: {ds['a'].dtype.metadata}"") ``` ```python creating dataset with empty string array ----------------------------------------- dtype: object metadata: {'element_type': } ncdump ------- netcdf a { dimensions: a = UNLIMITED ; // (0 currently) variables: string a(a) ; data: } loading with netcdf4 ------------------- dtype: object metadata: None loading with h5netcdf ------------------- dtype: object metadata: {'vlen': } ``` Engine `netcdf4` does not roundtrip here, losing the dtype metadata information. There is special casing for h5netcdf backend, though. The source is actually located in `open_store_variable` of `netcdf4` backend, when the underlying data is converted to `Variable` (which does some object dtype twiddling). Unfortunately I do not have an immediate solution here. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720045908 https://github.com/pydata/xarray/issues/7328#issuecomment-1560534067,https://api.github.com/repos/pydata/xarray/issues/7328,1560534067,IC_kwDOAMm_X85dA9wz,5821660,2023-05-24T06:37:39Z,2023-05-24T06:37:39Z,MEMBER,"@tomwhite Sorry for the delay here. I'll respond shortly on your PR #7862, but we might have to reiterate here later","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1466586967 https://github.com/pydata/xarray/pull/7865#issuecomment-1560225308,https://api.github.com/repos/pydata/xarray/issues/7865,1560225308,IC_kwDOAMm_X85c_yYc,2448579,2023-05-23T22:49:14Z,2023-05-23T22:49:14Z,MEMBER,Thanks @martinfleis this is a very valuable contribution to the ecosystem! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720850091 https://github.com/pydata/xarray/pull/7865#issuecomment-1560060281,https://api.github.com/repos/pydata/xarray/issues/7865,1560060281,IC_kwDOAMm_X85c_KF5,14808389,2023-05-23T20:11:32Z,2023-05-23T20:11:32Z,MEMBER,"this appears to have [worked](https://github.com/pydata/xarray/actions/runs/5061550082). Thanks, @martinfleis!","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,1720850091 https://github.com/pydata/xarray/pull/7865#issuecomment-1560049420,https://api.github.com/repos/pydata/xarray/issues/7865,1560049420,IC_kwDOAMm_X85c_HcM,14808389,2023-05-23T20:02:05Z,2023-05-23T20:02:05Z,MEMBER,"> add the token as a `ANACONDA_NIGHTLY` secret. done. Let's try it!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720850091 https://github.com/pydata/xarray/issues/7868#issuecomment-1559959581,https://api.github.com/repos/pydata/xarray/issues/7868,1559959581,IC_kwDOAMm_X85c-xgd,5821660,2023-05-23T18:42:55Z,2023-05-23T19:01:00Z,MEMBER,@ghiggi Thanks for getting this back into action. I got dragged away from the one string object issue in #7654. I'll split this out and add a PR.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722417436 https://github.com/pydata/xarray/issues/7868#issuecomment-1559973194,https://api.github.com/repos/pydata/xarray/issues/7868,1559973194,IC_kwDOAMm_X85c-01K,5821660,2023-05-23T18:55:46Z,2023-05-23T18:55:46Z,MEMBER,@ghiggi I'd appreciate if you could test your workflows against #7869. Your example and the one over in #7652 are working AFAICT.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1722417436 https://github.com/pydata/xarray/pull/7865#issuecomment-1559677947,https://api.github.com/repos/pydata/xarray/issues/7865,1559677947,IC_kwDOAMm_X85c9sv7,14808389,2023-05-23T15:33:46Z,2023-05-23T15:33:46Z,MEMBER,"> Do we need to build the wheel in the same way you currently do in [the TestPyPI workflow] depends on whether we can put local versions on anaconda. PyPI and TestPyPI don't allow that, so we had to modify `pyproject.toml` to make `setuptools-scm` generate versions without the local part. > Do you have an account there so I can add you? now I do, the username is the same as on github.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720850091 https://github.com/pydata/xarray/pull/7867#issuecomment-1559210203,https://api.github.com/repos/pydata/xarray/issues/7867,1559210203,IC_kwDOAMm_X85c76jb,14808389,2023-05-23T12:33:48Z,2023-05-23T12:33:48Z,MEMBER,"since the version *with* `cdms2` fails on environment creation we can't really remove the special case for `python=3.11` until we reached a decision on what to do with `cdms2` support. I'll open a new issue for that, but otherwise this should be ready for merging.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1721896187 https://github.com/pydata/xarray/issues/7863#issuecomment-1557705518,https://api.github.com/repos/pydata/xarray/issues/7863,1557705518,IC_kwDOAMm_X85c2LMu,14808389,2023-05-22T18:33:15Z,2023-05-22T18:33:15Z,MEMBER,"I wonder if pure-python projects could get away with asking to install from github? This works today: ```sh pip install git+https://github.com/pydata/xarray.git ``` and we have been using it downstream in nightly CI. That said, I can see a central location being helpful, and we'd certainly be happy to add a scheduled github action to upload built packages. We'd need some help with setting that up, though, as I personally don't have any experience whatsoever in uploading to `anaconda.org`. Do you have documentation/examples on how to do the actual upload? That would also allow us to stop publishing builds to TestPyPI (not sure if those are nightlies), as that seems to have accumulated quite a few packages already that due to the PyPI policy stay there forever.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1720191529 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/pull/7827#issuecomment-1557089270,https://api.github.com/repos/pydata/xarray/issues/7827,1557089270,IC_kwDOAMm_X85cz0v2,6628425,2023-05-22T11:58:18Z,2023-05-22T11:58:18Z,MEMBER,"Great, yeah, that's a nice example without writing to disk. Indeed I saw those warnings too, but omitted them in my earlier message to focus on the encoding issue (sorry about that). I agree that these are something we should address.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1700227455 https://github.com/pydata/xarray/pull/7827#issuecomment-1556891860,https://api.github.com/repos/pydata/xarray/issues/7827,1556891860,IC_kwDOAMm_X85czEjU,5821660,2023-05-22T09:40:04Z,2023-05-22T09:40:04Z,MEMBER,"The example below is only based on Variable and the cf encode/decode variable functions. ```python import xarray as xr import numpy as np # create DataArray times = [np.datetime64(""2000-01-01"", ""ns""), np.datetime64(""NaT"")] da = xr.DataArray(times, dims=[""time""], name=""foo"") da.encoding[""dtype""] = np.float64 da.encoding[""_FillValue""] = 20.0 # extract Variable source_var = da.variable print(""---------- source_var ------------------"") print(source_var) print(source_var.encoding) # encode Variable encoded_var = xr.conventions.encode_cf_variable(source_var) print(""\n---------- encoded_var ------------------"") print(encoded_var) # decode Variable decoded_var = xr.conventions.decode_cf_variable(""foo"", encoded_var) print(""\n---------- decoded_var ------------------"") print(decoded_var.load()) ``` ```python /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:618: RuntimeWarning: invalid value encountered in cast int_num = np.asarray(num, dtype=np.int64) /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:254: RuntimeWarning: invalid value encountered in cast flat_num_dates_ns_int = (flat_num_dates * _NS_PER_TIME_DELTA[delta]).astype( /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:254: RuntimeWarning: invalid value encountered in cast flat_num_dates_ns_int = (flat_num_dates * _NS_PER_TIME_DELTA[delta]).astype( ---------- source_var ------------------ array(['2000-01-01T00:00:00.000000000', 'NaT'], dtype='datetime64[ns]') {'dtype': , '_FillValue': 20.0} dtype num float64 ---------- encoded_var ------------------ array([ 0., 20.]) Attributes: units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian _FillValue: 20.0 ---------- decoded_var ------------------ array(['2000-01-01T00:00:00.000000000', 'NaT'], dtype='datetime64[ns]') {'_FillValue': 20.0, 'units': 'days since 2000-01-01 00:00:00', 'calendar': 'proleptic_gregorian', 'dtype': dtype('float64')} ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1700227455 https://github.com/pydata/xarray/pull/7827#issuecomment-1556869361,https://api.github.com/repos/pydata/xarray/issues/7827,1556869361,IC_kwDOAMm_X85cy_Dx,5821660,2023-05-22T09:24:47Z,2023-05-22T09:24:47Z,MEMBER,"@spencerkclark With current master I get the following `RuntimeWarning` running your code example: - on encoding (calling `to_netcdf()`): ```python /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:618: RuntimeWarning: invalid value encountered in cast int_num = np.asarray(num, dtype=np.int64) ``` - on decoding (calling `open_dataset()`): ```python /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:254: RuntimeWarning: invalid value encountered in cast flat_num_dates_ns_int = (flat_num_dates * _NS_PER_TIME_DELTA[delta]).astype( /home/kai/miniconda/envs/xarray_311/lib/python3.11/site-packages/xarray/coding/times.py:254: RuntimeWarning: invalid value encountered in cast flat_num_dates_ns_int = (flat_num_dates * _NS_PER_TIME_DELTA[delta]).astype( ``` The latter was discussed in #7098 (casting float64 to int64), the former was aimed to be resolved with this PR. I'll try to create a test case using `Variable` and the respective encoding/decoding functions without involving IO (per your suggestion @spencerkclark). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1700227455 https://github.com/pydata/xarray/issues/7856#issuecomment-1556201913,https://api.github.com/repos/pydata/xarray/issues/7856,1556201913,IC_kwDOAMm_X85cwcG5,35968931,2023-05-21T15:04:05Z,2023-05-21T15:04:05Z,MEMBER,"The only reason I didn't separate the chunkmanager entry points into local and other entry points was simplicity of code. I didn't realise that might make a difference when it came to whether or not you have to pip install - I assumed that adding a new type of entry point would require re-installing no matter how I implemented it. If that's not the case perhaps we should adjust it (and re-release).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7856#issuecomment-1556198984,https://api.github.com/repos/pydata/xarray/issues/7856,1556198984,IC_kwDOAMm_X85cwbZI,14371165,2023-05-21T14:51:55Z,2023-05-21T14:51:55Z,MEMBER,"Nope, I have not tried that. I suspect things will just self heal then considering the CI without understanding the root cause. Looking at the backends; we initialize a dict here: https://github.com/pydata/xarray/blob/d8ec3a3f6b02a8b941b484b3d254537af84b5fde/xarray/backends/common.py#L435 Stores each of our entrypoints like this: https://github.com/pydata/xarray/blob/d8ec3a3f6b02a8b941b484b3d254537af84b5fde/xarray/backends/h5netcdf_.py#L438 Then we append the local and other entrypoints together here: https://github.com/pydata/xarray/blob/d8ec3a3f6b02a8b941b484b3d254537af84b5fde/xarray/backends/plugins.py#L106-L116 But `load_chunkmanagers` doesn't really seem to append from a dict: https://github.com/pydata/xarray/blob/d8ec3a3f6b02a8b941b484b3d254537af84b5fde/xarray/core/parallelcompat.py#L48-L62 Why do the backends use the `BACKEND_ENTRYPOINTS` strategy? To avoid these cases? Or something else?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7856#issuecomment-1556191719,https://api.github.com/repos/pydata/xarray/issues/7856,1556191719,IC_kwDOAMm_X85cwZnn,35968931,2023-05-21T14:19:27Z,2023-05-21T14:35:22Z,MEMBER,"Yes, but I'm wondering what functional difference is that making here? Have you tried doing the local pip install of the xarray dev version again? I.e. `pip install -e .` from the xarray folder. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7856#issuecomment-1556191288,https://api.github.com/repos/pydata/xarray/issues/7856,1556191288,IC_kwDOAMm_X85cwZg4,14371165,2023-05-21T14:17:30Z,2023-05-21T14:17:30Z,MEMBER,"The CI recreates its entire environment all the time and I don't? ```python from xarray.core.parallelcompat import list_chunkmanagers list_chunkmanagers() Out[1]: {} ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7856#issuecomment-1556182520,https://api.github.com/repos/pydata/xarray/issues/7856,1556182520,IC_kwDOAMm_X85cwXX4,35968931,2023-05-21T13:36:22Z,2023-05-21T13:36:22Z,MEMBER,"Hmm, it's acting as if dask is not installed/importable. Any idea what's different about your setup vs the xarray CI? Yes daskmanager is also registered via a different entry point, but that should already be set up to happen by default. To see which chunk managers it can find you can call ```python from xarray.core.parallelcompat import list_chunkmanagers list_chunkmanagers() ``` I expect it will return an empty list in your case, but that's the code we should be trying to debug on your system. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/pull/7844#issuecomment-1556160022,https://api.github.com/repos/pydata/xarray/issues/7844,1556160022,IC_kwDOAMm_X85cwR4W,14371165,2023-05-21T11:54:28Z,2023-05-21T11:55:48Z,MEMBER,"``` before after ratio [05c7888d] [d135ab97] - 2.47±0.02s 806±6ms 0.33 pandas.ToDataFrameDask.time_to_dataframe ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1710752209 https://github.com/pydata/xarray/issues/7856#issuecomment-1556114932,https://api.github.com/repos/pydata/xarray/issues/7856,1556114932,IC_kwDOAMm_X85cwG30,14371165,2023-05-21T08:13:47Z,2023-05-21T08:13:47Z,MEMBER,"Our backends are stored in a dict like this: `BACKEND_ENTRYPOINTS[""h5netcdf""] = (""h5netcdf"", H5netcdfBackendEntrypoint)`. Is it something similar `daskmanager` needs to do?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7856#issuecomment-1556113793,https://api.github.com/repos/pydata/xarray/issues/7856,1556113793,IC_kwDOAMm_X85cwGmB,14371165,2023-05-21T08:09:09Z,2023-05-21T08:09:09Z,MEMBER,cc @TomNicholas ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1718410975 https://github.com/pydata/xarray/issues/7707#issuecomment-1555902158,https://api.github.com/repos/pydata/xarray/issues/7707,1555902158,IC_kwDOAMm_X85cvS7O,14808389,2023-05-20T12:32:47Z,2023-05-20T15:26:43Z,MEMBER,"with #7855 and the recent change to `pint` we're finally down to just two test failures (and a whole lot of warnings): ``` xarray/tests/test_dataarray.py::TestDataArray::test_to_and_from_cdms2_sgrid: ValueError: operands could not be broadcast together with shapes (3,) (4,) xarray/tests/test_ufuncs.py::test_unary: AssertionError: assert ( is or 1.0 == 0.9999999999999999) ``` The first one looks like `cdms2` is incompatible with a change in `numpy>=1.25`. Not sure if we can do anything about that, especially since there's a big warning on the [cdms2 repo](https://github.com/CDAT/cdms) stating that the package is going to be retired / archived by the end of this year... I guess we should start thinking about removing `cdms2` support? The second looks like a precision issue, which we should be able to resolve by using `assert_allclose` instead... not sure, though, especially given numpy/numpy#23773. Otherwise we could just defer to whatever `numpy` is doing (of course, that assumes that `full_like` works properly, which might not be a good idea for a unit test): ```python @pytest.mark.parametrize( ""a"", [ xr.Variable([""x""], [0, 0]), xr.DataArray([0, 0], dims=""x""), xr.Dataset({""y"": (""x"", [0, 0])}), ], ) def test_unary(a): fill_value = np.cos(0) expected = xr.full_like(a, fill_value=fill_value, dtype=fill_value.dtype) actual = np.cos(a) assert_identical(actual, expected) ``` Edit: if relying on `full_like` turns out to be a concern, maybe we could use ""copy + assign"" instead?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1650481625 https://github.com/pydata/xarray/pull/7827#issuecomment-1554532844,https://api.github.com/repos/pydata/xarray/issues/7827,1554532844,IC_kwDOAMm_X85cqEns,5821660,2023-05-19T12:57:31Z,2023-05-19T12:57:31Z,MEMBER,Thanks @spencerkclark for taking the time. NaN has been written to disk (as you assumed). Let's have another try next week.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1700227455 https://github.com/pydata/xarray/issues/7848#issuecomment-1553614542,https://api.github.com/repos/pydata/xarray/issues/7848,1553614542,IC_kwDOAMm_X85cmkbO,35968931,2023-05-18T20:36:35Z,2023-05-18T21:07:33Z,MEMBER,"`np.pad` is an interesting example in the context of chunked arrays (xref #6807) - dask implements it (parallelized using various approaches, including `map_blocks` internally), but [cubed](https://github.com/tomwhite/cubed) currently doesn't implement it because it's not part of the array API standard. (cc @tomwhite) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1716228662 https://github.com/pydata/xarray/pull/7815#issuecomment-1553588837,https://api.github.com/repos/pydata/xarray/issues/7815,1553588837,IC_kwDOAMm_X85cmeJl,35968931,2023-05-18T20:10:43Z,2023-05-18T20:10:43Z,MEMBER,Closing in favour of #7847,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695244129 https://github.com/pydata/xarray/pull/7019#issuecomment-1553453937,https://api.github.com/repos/pydata/xarray/issues/7019,1553453937,IC_kwDOAMm_X85cl9Nx,2443309,2023-05-18T18:27:52Z,2023-05-18T18:27:52Z,MEMBER,👏 Congrats @TomNicholas on getting this in! Such an important contribution. 👏 ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1368740629 https://github.com/pydata/xarray/pull/7019#issuecomment-1553395594,https://api.github.com/repos/pydata/xarray/issues/7019,1553395594,IC_kwDOAMm_X85clu-K,35968931,2023-05-18T17:37:22Z,2023-05-18T17:37:22Z,MEMBER,Woooo thanks @dcherian ! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1368740629 https://github.com/pydata/xarray/pull/7019#issuecomment-1553390072,https://api.github.com/repos/pydata/xarray/issues/7019,1553390072,IC_kwDOAMm_X85cltn4,2448579,2023-05-18T17:34:01Z,2023-05-18T17:34:01Z,MEMBER,Thanks @TomNicholas Big change!,"{""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 3, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1368740629 https://github.com/pydata/xarray/pull/7788#issuecomment-1551638978,https://api.github.com/repos/pydata/xarray/issues/7788,1551638978,IC_kwDOAMm_X85cfCHC,2448579,2023-05-17T15:45:41Z,2023-05-17T15:45:41Z,MEMBER,"Thanks @maxhollmann I pushed a test for #2377. I see this is your first contribution to Xarray. Welcome! #1792 would be a nice contribution if you're looking for more to do ;)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1685422501 https://github.com/pydata/xarray/issues/7841#issuecomment-1550594808,https://api.github.com/repos/pydata/xarray/issues/7841,1550594808,IC_kwDOAMm_X85cbDL4,2448579,2023-05-17T02:24:57Z,2023-05-17T02:24:57Z,MEMBER,"We should migrate these to rioxarray if they aren't there already. cc @snowman2 @scottyhq @JessicaS11 ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1709215291 https://github.com/pydata/xarray/pull/7019#issuecomment-1550564976,https://api.github.com/repos/pydata/xarray/issues/7019,1550564976,IC_kwDOAMm_X85ca75w,35968931,2023-05-17T01:39:08Z,2023-05-17T01:39:08Z,MEMBER,"@Illviljan thanks for all your comments! Would you (or @keewis?) be willing to approve this PR now? I would really like to merge this so that I can release a version of xarray that I can use as a dependency for [cubed-xarray](https://github.com/xarray-contrib/cubed-xarray).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1368740629 https://github.com/pydata/xarray/pull/7788#issuecomment-1550187275,https://api.github.com/repos/pydata/xarray/issues/7788,1550187275,IC_kwDOAMm_X85cZfsL,2448579,2023-05-16T18:47:27Z,2023-05-16T18:47:27Z,MEMBER,Thanks @maxhollmann can you add a note to `whats-new.rst` please?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1685422501 https://github.com/pydata/xarray/pull/7824#issuecomment-1547017905,https://api.github.com/repos/pydata/xarray/issues/7824,1547017905,IC_kwDOAMm_X85cNZ6x,14371165,2023-05-14T22:44:06Z,2023-05-15T08:40:51Z,MEMBER,"Think I'll stop here. @alimanfoo, feel free to try this out if you have the time. Results: ``` before after ratio [964d350a] [86ef9540] - 117±2ms 65.6±0.9ms 0.56 groupby.Resample.time_agg_large_num_groups('sum', 2, False) - 117±2ms 65.3±0.7ms 0.56 groupby.ResampleCFTime.time_agg_large_num_groups('sum', 2, False) - 113±1ms 62.0±0.4ms 0.55 groupby.ResampleCFTime.time_agg_large_num_groups('sum', 1, False) - 112±2ms 61.4±0.5ms 0.55 groupby.Resample.time_agg_large_num_groups('sum', 1, False) - 8.50±0.2ms 1.61±0.01ms 0.19 combine.Combine1d.time_combine_by_coords - 1.81±0.02s 224±2ms 0.12 combine.Combine1dDask.time_combine_by_coords SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY. PERFORMANCE INCREASED. ```","{""total_count"": 4, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 2, ""eyes"": 0}",,1699099029 https://github.com/pydata/xarray/issues/5511#issuecomment-1546951468,https://api.github.com/repos/pydata/xarray/issues/5511,1546951468,IC_kwDOAMm_X85cNJss,1217238,2023-05-14T17:17:56Z,2023-05-14T17:17:56Z,MEMBER,"If we can find cases where we know concurrent writes are unsafe, we can definitely start raising errors. Better to be safe than to suffer from silent data corruption!","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,927617256 https://github.com/pydata/xarray/pull/7840#issuecomment-1546028265,https://api.github.com/repos/pydata/xarray/issues/7840,1546028265,IC_kwDOAMm_X85cJoTp,14808389,2023-05-12T16:56:23Z,2023-05-12T16:56:23Z,MEMBER,"let's have a look at what defines the object: ```python data = xr.DataArray(np.random.randn(2, 3), dims=(""x"", ""y""), coords={""x"": [10, 20]}) ``` That means we have: - random data - two dimensions: x with a length of 2 and y with a length of 3 - one coordinate: x with values `[10, 20]` The line ```python data.x.attrs[""units""] = ""x units"" ``` can be split into two parts: ```python x = data.x ``` and ```python x.attrs[""units""] = ""x units"" ``` where `x` is the coordinate. If we did the same thing with `y` we would *not* get the dimension, but a dummy coordinate that has the values `np.arange(data.sizes[""y""])`. This is admittedly a bit confusing.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1707774178 https://github.com/pydata/xarray/issues/7838#issuecomment-1546024198,https://api.github.com/repos/pydata/xarray/issues/7838,1546024198,IC_kwDOAMm_X85cJnUG,2448579,2023-05-12T16:52:29Z,2023-05-12T16:52:29Z,MEMBER,"Thanks! I tracked this down to the difference between reading the file remotely, or downloading first and accessing a local copy on v0.20.2 (the latter is what I used to produce my figures). Can you reproduce? ``` remote = xr.open_dataset( ""http://kage.ldeo.columbia.edu:81/SOURCES/.LOCAL/.sst.mon.mean.nc/.sst/dods"" ).sst.sel(lat=20, lon=280, method=""nearest"") local = xr.open_dataset(""~/Downloads/data.cdf"").sst.sel(lat=20, lon=280, method=""nearest"") ``` ``` (remote.groupby(""time.month"") - remote.groupby(""time.month"").mean()).plot() ``` ![image](https://github.com/pydata/xarray/assets/2448579/a44e1c34-55b9-4b88-9604-c344cca14744) ``` (local.groupby(""time.month"") - local.groupby(""time.month"").mean()).plot() ``` ![image](https://github.com/pydata/xarray/assets/2448579/23f2f4dc-377e-43d1-b296-aab7c34285e1) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1706864252 https://github.com/pydata/xarray/pull/7796#issuecomment-1545974461,https://api.github.com/repos/pydata/xarray/issues/7796,1545974461,IC_kwDOAMm_X85cJbK9,2448579,2023-05-12T16:09:04Z,2023-05-12T16:09:14Z,MEMBER,"Yes, 10-30% on my machine: ``` before after ratio [91f14c9b] [1eb74149] - 1.17±0.04ms 1.02±0.04ms 0.87 accessors.DateTimeAccessor.time_dayofyear('standard') - 1.25±0.07ms 976±30μs 0.78 accessors.DateTimeAccessor.time_year('standard') - 3.90±0.1ms 2.68±0.05ms 0.69 accessors.DateTimeAccessor.time_year('noleap') - 4.75±0.07ms 3.25±0.04ms 0.68 accessors.DateTimeAccessor.time_dayofyear('noleap') ```","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,1689364566 https://github.com/pydata/xarray/pull/7788#issuecomment-1545939343,https://api.github.com/repos/pydata/xarray/issues/7788,1545939343,IC_kwDOAMm_X85cJSmP,2448579,2023-05-12T15:39:24Z,2023-05-12T15:39:24Z,MEMBER,"I defer to @shoyer, the solution with `where_method` seems good to me.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1685422501 https://github.com/pydata/xarray/pull/7840#issuecomment-1545937746,https://api.github.com/repos/pydata/xarray/issues/7840,1545937746,IC_kwDOAMm_X85cJSNS,14808389,2023-05-12T15:37:59Z,2023-05-12T15:37:59Z,MEMBER,"I agree, coordinate is the correct term. We could make that a bit less confusing by using a non-dimension coordinate in the example, but then again the point is that any coordinate can have additional metadata. > But I think the concept of dimension-coordinates (when the coordinate has the same name as the dimension) is still relevant. If I remember correctly, while they lost their status as the only ones having an index dimension coordinates are still used for alignment.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1707774178 https://github.com/pydata/xarray/issues/7838#issuecomment-1545930953,https://api.github.com/repos/pydata/xarray/issues/7838,1545930953,IC_kwDOAMm_X85cJQjJ,2448579,2023-05-12T15:32:47Z,2023-05-12T15:35:02Z,MEMBER,"Can you compare `ds_anom` at a point in both versions please? I get a plot that looks quite similar ### v0.20.2: ![image](https://github.com/pydata/xarray/assets/2448579/fbea3985-ec66-44c9-b434-7497778b9004) ### v2022.03.0: ![image](https://github.com/pydata/xarray/assets/2448579/a4843606-934f-4a86-831b-31cfaba1e62c) ### v2023.04.2 ![image](https://github.com/pydata/xarray/assets/2448579/57560794-d73b-47e0-adee-4343b60692b5) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1706864252 https://github.com/pydata/xarray/pull/7788#issuecomment-1545446155,https://api.github.com/repos/pydata/xarray/issues/7788,1545446155,IC_kwDOAMm_X85cHaML,5821660,2023-05-12T09:23:13Z,2023-05-12T09:23:13Z,MEMBER,"@maxhollmann I'm sorry, I'm still finding my way into Xarray. I've taken a closer look at #2377, especially https://github.com/pydata/xarray/issues/2377#issuecomment-415074188. There @shoyer suggested to just use: ```python data = duck_array_ops.where_method(data, ~mask, fill_value) ``` instead of ```python data[mask] = fill_value ``` I've checked and it works nicely with your test. That way we would get away without the flags test and the special handling will take place in duck_array_ops. Would be great if someone can double check. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1685422501 https://github.com/pydata/xarray/issues/4220#issuecomment-1545408039,https://api.github.com/repos/pydata/xarray/issues/4220,1545408039,IC_kwDOAMm_X85cHQ4n,5821660,2023-05-12T08:55:09Z,2023-05-12T08:55:09Z,MEMBER,`combine_first` uses `fillna` under the hood -> #3570,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,656089264