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 2240600694,PR_kwDOAMm_X85shCWz,8933,Use array_api compliant dtype,14371165,open,0,,,0,2024-04-12T17:30:51Z,2024-04-30T03:57:57Z,,MEMBER,,1,pydata/xarray/pulls/8933," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` Notes: * For duckarrays, use _dtype[_generic] * For actual np.ndarrays, use np.dtype[np.generic] * np.dtype is too specific in general and it's probably not needed in most of their array_api functions. * _DTypeBase-class in np? * Mixing dtypes from np and xp is discouraged: https://github.com/data-apis/array-api/issues/582 * Using asarray seems to be the recommended way. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8933/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2232134629,PR_kwDOAMm_X85sD5gg,8922,Add typing to some functions in indexing.py,14371165,closed,0,,,0,2024-04-08T21:45:30Z,2024-04-10T18:05:52Z,2024-04-10T18:05:52Z,MEMBER,,0,pydata/xarray/pulls/8922,"A drive-by PR as I was trying to figure out how these functions works. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8922/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2215113392,PR_kwDOAMm_X85rJ3wR,8889,Add typing to test_plot.py,14371165,closed,0,,,0,2024-03-29T10:49:39Z,2024-04-05T16:42:27Z,2024-04-05T16:42:27Z,MEMBER,,0,pydata/xarray/pulls/8889,Enforce typing on all tests in `test_plot.py` and add the remaining type hints.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8889/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2184947713,PR_kwDOAMm_X85pjnvS,8831,Fix datetime in colorbar,14371165,open,0,,,0,2024-03-13T21:48:44Z,2024-03-27T06:39:13Z,,MEMBER,,1,pydata/xarray/pulls/8831," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ```python import xarray as xr airtemps = xr.tutorial.open_dataset(""air_temperature"") airtemps.air[:200].isel(lat=10, lon=10).plot.scatter(x=""time"", hue=""time"") ``` Before: ![image](https://github.com/pydata/xarray/assets/14371165/3c5fa76c-8cc9-4af5-a20a-ae8e4874bdd9) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8831/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1803788143,PR_kwDOAMm_X85VdjgR,7986,Add new what's new section,14371165,closed,0,,,0,2023-07-13T21:29:01Z,2024-03-13T21:43:09Z,2023-07-13T21:30:07Z,MEMBER,,0,pydata/xarray/pulls/7986,Add a new what's new section,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7986/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1975173557,PR_kwDOAMm_X85ee4vk,8406,Add getitem to array protocol,14371165,closed,0,,,0,2023-11-02T23:02:48Z,2023-12-12T20:54:00Z,2023-12-12T20:44:11Z,MEMBER,,0,pydata/xarray/pulls/8406,"Currently using getitem is not allowed for either a arrayfunction or arrayapi according to the type hints. Add support for it. Issues found in #8344 as more and more typing was added. But getitem is used in main as well which should fail, but manages to pass due to lack of type hints: https://github.com/pydata/xarray/blob/9acc411bc7e99e61269eadf77e96b9ddd40aec9e/xarray/namedarray/core.py#L792 Notes * mypy will now complain for `_arrayapi[None]` or `_arrayapi([None,)]`, use `xp.expand_dims(_arrayapi)` for now instead. https://github.com/numpy/numpy/pull/25022 https://github.com/data-apis/array-api/pull/687 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8406/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1966953477,PR_kwDOAMm_X85eC9NL,8391,Add duckarray test for np.array_api,14371165,closed,0,,,0,2023-10-29T11:37:29Z,2023-12-06T22:30:04Z,2023-10-31T03:05:23Z,MEMBER,,0,pydata/xarray/pulls/8391,"Check if the Array object from numpy.array_api is a valid duckarray. If it isn't we're likely doing something wrong. Comments: * array_api standard does not specify a `__array__`-method. * Move `__array__` to _arrayfunction only * We therefore have to use `np.asarray(namedarray.data)` when comparing ndarrays in the tests Seen in #8344","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8391/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1971126897,PR_kwDOAMm_X85eRLVH,8396,Test masked array,14371165,closed,0,,,0,2023-10-31T19:00:35Z,2023-11-03T15:07:35Z,2023-11-03T15:07:34Z,MEMBER,,0,pydata/xarray/pulls/8396,"Add a test for masked array in order to make sure it works. Be consistent and use the shapetype dtype generics style instead. Starting to think it's easier to just stick to one style of typing, even though the other option might be a little shorter.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8396/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1971001432,PR_kwDOAMm_X85eQvnS,8395,Correct typing for _sparsearray,14371165,closed,0,,,0,2023-10-31T17:50:47Z,2023-10-31T19:28:49Z,2023-10-31T19:28:49Z,MEMBER,,0,pydata/xarray/pulls/8395,"Use _DType_co instead, otherwise the dtype wont be correctly passed along. Quick follow up to #8387.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8395/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1966603230,PR_kwDOAMm_X85eB5WY,8387,Fix sparse typing,14371165,closed,0,,,0,2023-10-28T13:50:08Z,2023-10-31T17:43:58Z,2023-10-31T17:43:57Z,MEMBER,,0,pydata/xarray/pulls/8387,"Fixes the following pyright error on main: ``` C:\Users\J.W\Documents\GitHub\xarray\xarray\namedarray\core.py:846:39 - error: Argument of type ""NDArray[Any]"" cannot be assigned to parameter ""data"" of type ""duckarray[_ShapeType_co@NamedArray, _DType_co@NamedArray] | Default"" in function ""_replace""   Type ""NDArray[Any]"" cannot be assigned to type ""duckarray[_ShapeType_co@NamedArray, _DType_co@NamedArray] | Default""     ""NDArray[Any]"" is incompatible with protocol ""_arrayfunction[_ShapeType_co@NamedArray, _DType_co@NamedArray]""       Type ""(dtype: None = ..., /) -> ndarray[Any, _dtype]"" cannot be assigned to type ""(dtype: _DType@__array__, /) -> ndarray[Any, _DType@__array__]""         Parameter 1: type ""_DType@__array__"" cannot be assigned to type ""None""           Type cannot be assigned to type ""None""       Type ""(dtype: None = ..., /) -> ndarray[Any, _dtype]"" cannot be assigned to type ""(dtype: _DType@__array__, /) -> ndarray[Any, _DType@__array__]""         Parameter 1: type ""_DType@__array__"" cannot be assigned to type ""None""           Type cannot be assigned to type ""None"" ... (reportGeneralTypeIssues) ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8387/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1966902041,PR_kwDOAMm_X85eCzIK,8390,Remove duplicated navigation_with_keys in docs config,14371165,closed,0,,,0,2023-10-29T08:52:56Z,2023-10-29T11:08:33Z,2023-10-29T11:08:33Z,MEMBER,,0,pydata/xarray/pulls/8390,"Fixes: ``` Running Sphinx v6.2.1 Traceback (most recent call last): File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8387/lib/python3.10/site-packages/sphinx/config.py"", line 353, in eval_config_file code = compile(f.read(), filename.encode(fs_encoding), 'exec') File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/8387/doc/conf.py"", line 240 navigation_with_keys=False, ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: keyword argument repeated: navigation_with_keys The above exception was the direct cause of the following exception: Traceback (most recent call last): File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8387/lib/python3.10/site-packages/sphinx/cmd/build.py"", line 280, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8387/lib/python3.10/site-packages/sphinx/application.py"", line 207, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8387/lib/python3.10/site-packages/sphinx/config.py"", line 177, in read namespace = eval_config_file(filename, tags) File ""/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8387/lib/python3.10/site-packages/sphinx/config.py"", line 357, in eval_config_file raise ConfigError(msg % err) from err sphinx.errors.ConfigError: There is a syntax error in your configuration file: keyword argument repeated: navigation_with_keys (conf.py, line 240) Configuration error: There is a syntax error in your configuration file: keyword argument repeated: navigation_with_keys (conf.py, line 240) Command time: 0s Return: 2 ``` Seen in #8387","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8390/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1962432308,PR_kwDOAMm_X85dzwDL,8376,Add chunkedduckarray to _typing ,14371165,closed,0,,,0,2023-10-25T23:09:46Z,2023-10-26T19:10:41Z,2023-10-26T01:13:54Z,MEMBER,,0,pydata/xarray/pulls/8376,"Add more chunkedarray typing options. Also clean up some ideas that didn't work out. Using TypeVar for arrays for example has turned out to not work that great because of the very common dtype changes. If you want to check if an ArrayLike is a chunked array: ```python if isinstance(data, _chunkedarrayfunction_or_api): data.chunk() ``` However try to rely on mypy in private functions over isinstance checks for better performance: ```python def _do_compute(data: chunkedduckarray[Any, _DType]) -> duckarray[Any, _DType]: return data.compute() ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8376/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1957838652,PR_kwDOAMm_X85dkPUb,8362,NamedArray.ndim can only be int,14371165,closed,0,,,0,2023-10-23T19:02:48Z,2023-10-23T19:04:14Z,2023-10-23T19:04:14Z,MEMBER,,0,pydata/xarray/pulls/8362,"ndim is usually defined as `len(self.shape)`, which does not care about the values in the shape-tuple. So there's no risk when getting unknown shape sizes from for example a masked dask array. Reference: https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.ndim.html ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8362/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1955651132,PR_kwDOAMm_X85dc-58,8355,Use namedarray repr in _array_api docstrings,14371165,closed,0,,,0,2023-10-21T20:20:31Z,2023-10-22T04:50:30Z,2023-10-22T00:52:03Z,MEMBER,,0,pydata/xarray/pulls/8355,"Use the normal repr now that NamedArray has one. Noticed a bug as well, that sometimes the repr attempts to call `NamedArray._in_memory` which doesn't exist. Seen in #8344.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8355/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1955654332,PR_kwDOAMm_X85dc_gm,8356,Remove unnecessary for loop when using get_axis_num,14371165,closed,0,,,0,2023-10-21T20:33:37Z,2023-10-22T04:50:16Z,2023-10-22T00:49:39Z,MEMBER,,0,pydata/xarray/pulls/8356,Noticed an unnecessary for loop when playing around with `self.get_axis_num` in #8344.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8356/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1954723109,PR_kwDOAMm_X85dZ9lj,8352,Add better ASV test cases for open_dataset,14371165,closed,0,,,0,2023-10-20T17:12:29Z,2023-10-20T18:34:36Z,2023-10-20T18:34:35Z,MEMBER,,0,pydata/xarray/pulls/8352,With more realistic array sizes maybe the improvements in #8339 should be noticeable.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8352/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1946069214,PR_kwDOAMm_X85c8hTY,8320,Remove redundant check in IndexVariable,14371165,closed,0,,,0,2023-10-16T20:50:19Z,2023-10-17T16:41:32Z,2023-10-17T16:41:32Z,MEMBER,,0,pydata/xarray/pulls/8320,"Reverts a few things from #8313. An IndexVariable can only have PandasIndexAdapter as self._data, which makes the for MemoryCachedArray unnecessary. Seen in #8294.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8320/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1944067022,PR_kwDOAMm_X85c1r1z,8313,Reverse type checks for better type inheritance,14371165,closed,0,,,0,2023-10-15T21:38:59Z,2023-10-16T06:30:55Z,2023-10-16T06:30:55Z,MEMBER,,0,pydata/xarray/pulls/8313,"Seen in #8294. It's usually better to switch if-checks so that the wider type is defined first. Especially when relying on the implicit type casting like we do here.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8313/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1931223548,PR_kwDOAMm_X85cKiKo,8280,Remove if condition to trigger mypy,14371165,closed,0,,,0,2023-10-07T06:49:18Z,2023-10-08T00:49:34Z,2023-10-08T00:49:34Z,MEMBER,,0,pydata/xarray/pulls/8280,This seems to be fixed according to #6551.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8280/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1903465587,PR_kwDOAMm_X85atB8W,8211,Add T_DuckArray to DataArray,14371165,open,0,,,0,2023-09-19T17:48:11Z,2023-10-03T17:45:40Z,,MEMBER,,1,pydata/xarray/pulls/8211," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8211/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1903622707,PR_kwDOAMm_X85atj9b,8214,Bind T_DuckArray to Variable,14371165,open,0,,,0,2023-09-19T19:42:34Z,2023-10-03T17:40:26Z,,MEMBER,,1,pydata/xarray/pulls/8214," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8214/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1916447957,PR_kwDOAMm_X85bYxsO,8243,Add type hints to maybe_promote in dtypes.py,14371165,closed,0,,,0,2023-09-27T22:53:34Z,2023-09-28T19:39:56Z,2023-09-28T19:39:55Z,MEMBER,,0,pydata/xarray/pulls/8243,Reducing type errors in #8241,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8243/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1909448043,PR_kwDOAMm_X85bBQuc,8226,Add typing to functions related to data_vars,14371165,closed,0,,,0,2023-09-22T19:54:22Z,2023-09-24T14:03:55Z,2023-09-24T14:03:55Z,MEMBER,,0,pydata/xarray/pulls/8226,A smaller PR related to trying to pass T_DuckArray's along xarray's different classes.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8226/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1890927857,PR_kwDOAMm_X85aC50x,8172,"Don't try to sort hashable, map to string",14371165,closed,0,,,0,2023-09-11T17:10:22Z,2023-09-11T18:09:15Z,2023-09-11T18:09:15Z,MEMBER,,0,pydata/xarray/pulls/8172,"Fixes the mypy error we're seeing in the CI at the moment: ``` xarray/core/dataset.py:5286: error: Value of type variable ""SupportsRichComparisonT"" of ""sorted"" cannot be ""Hashable"" [type-var] ``` Can't sort Hashables apparently. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8172/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1797533374,PR_kwDOAMm_X85VIIy4,7975,Test using asv compare,14371165,open,0,,,0,2023-07-10T20:27:31Z,2023-07-13T21:47:05Z,,MEMBER,,1,pydata/xarray/pulls/7975," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` References: https://github.com/cvxpy/cvxpy/pull/1810 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7975/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1797246423,PR_kwDOAMm_X85VHLJ1,7972,Skip broken tests on Python 3.11 and Windows,14371165,closed,0,,,0,2023-07-10T17:54:54Z,2023-07-10T18:54:38Z,2023-07-10T18:54:38Z,MEMBER,,0,pydata/xarray/pulls/7972,"Temporally skip tests in order to make CI pass again, the troublesome tests are reported in #7971.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7972/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1410618081,PR_kwDOAMm_X85A4TS_,7174,Move .line to plot1d,14371165,open,0,,,0,2022-10-16T20:51:23Z,2023-06-19T20:37:30Z,,MEMBER,,1,pydata/xarray/pulls/7174," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7174/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1718427036,PR_kwDOAMm_X85Q88zP,7857,Avoid explicit loop when updating OrderedSet,14371165,closed,0,,,0,2023-05-21T09:06:58Z,2023-05-25T20:08:35Z,2023-05-25T20:08:34Z,MEMBER,,0,pydata/xarray/pulls/7857,"Following recommendation from: https://github.com/pydata/xarray/pull/7824#discussion_r1196114696 ```python # main: a = tuple(f""dim_{i}"" for i in range(500)) %timeit OrderedSet(a) 46 µs ± 2.26 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) # This PR: a = tuple(f""dim_{i}"" for i in range(500)) %timeit OrderedSet(a) 28.9 µs ± 476 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7857/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1718477599,PR_kwDOAMm_X85Q9G1M,7858,Add type hints to test_dtypes,14371165,closed,0,,,0,2023-05-21T12:00:26Z,2023-05-21T12:30:18Z,2023-05-21T12:30:18Z,MEMBER,,0,pydata/xarray/pulls/7858,"Split out from #7858. Improve mypy coverage in order to understand better what the functions are actually used for.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7858/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1710742907,PR_kwDOAMm_X85QjGIu,7843,Improve interp performance,14371165,closed,0,,,0,2023-05-15T20:02:25Z,2023-05-18T18:54:15Z,2023-05-18T18:54:15Z,MEMBER,,0,pydata/xarray/pulls/7843,"* Use fastpaths * Only transpose multi-dimensional arrays. * Calculating chunks and shapes can be costly, prefer doing it once.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7843/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1691458797,PR_kwDOAMm_X85PiT3U,7804,Test asv ci,14371165,closed,0,,,0,2023-05-01T21:54:07Z,2023-05-01T22:24:14Z,2023-05-01T22:24:14Z,MEMBER,,1,pydata/xarray/pulls/7804," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7804/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1537068105,I_kwDOAMm_X85bncxJ,7450,Backend array documentation typo,14371165,open,0,,,0,2023-01-17T21:37:26Z,2023-01-17T21:56:12Z,,MEMBER,,,,"### What happened? https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#indexing-examples I believe there's a typo in the BASIC indexing support example: ```python # shall support integers backend_array._raw_indexing_method(1, 1) ``` Should be: ```python # shall support integers backend_array._raw_indexing_method((1, 1)) ``` Suggestion of possible fixes: * Make sure it is a typo. * Create a valid custom MyBackendArray and initialize it. So it is easier to tell if it's a typo. * Add type hinting so mypy can easier catch these errors. ### What did you expect to happen? _No response_ ### Minimal Complete Verifiable Example _No response_ ### MVCE confirmation - [ ] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [ ] Complete example — the example is self-contained, including all data and the text of any traceback. - [ ] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [ ] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7450/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1457017483,PR_kwDOAMm_X85DTsQq,7303,Add mypy version to xr.show_versions,14371165,closed,0,,,0,2022-11-20T19:27:20Z,2022-11-21T21:33:15Z,2022-11-21T21:33:15Z,MEMBER,,0,pydata/xarray/pulls/7303,"It's a little tricky getting the mypy version, so adding it to the show_versions function as well.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7303/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1422869912,PR_kwDOAMm_X85BhYOh,7219,Explicitly remove grids for pcolormesh,14371165,closed,0,,,0,2022-10-25T18:04:14Z,2022-10-28T16:22:53Z,2022-10-28T16:22:53Z,MEMBER,,0,pydata/xarray/pulls/7219,"Removes a warning in the plotting tests, related to https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.5.0.html#auto-removal-of-grids-by-pcolor-and-pcolormesh. I just added `ax.grid(False)` but maybe we just want whatever is the default of matplotlib? ```python import xarray as xr airtemps = xr.tutorial.open_dataset(""air_temperature"") air = airtemps.air - 273.15 air.attrs = airtemps.air.attrs air.attrs[""units""] = ""deg C"" air2d = air.isel(time=500) fig, axs = plt.subplots(2,1) air2d.plot(ax=axs[0]) # No grid. air2d.plot(ax=axs[1]) # With grid. axs[1].grid(True) ``` ![image](https://user-images.githubusercontent.com/14371165/197848951-01834aba-a260-4793-aa66-85288875498d.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7219/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1376776178,I_kwDOAMm_X85SD-_y,7049,Backend entrypoints not public?,14371165,closed,0,,,0,2022-09-17T13:41:13Z,2022-10-26T16:01:06Z,2022-10-26T16:01:06Z,MEMBER,,,,"### What is your issue? As I've understood it `ZarrBackendEntrypoint` is the engine used when loading zarr-files. But for some reason we show `ZarrStore` in `xr.backends`. I believe the `ZarrStore` class is supposed to be just a implementation detail, right? ```python # The available engines: xr.backends.list_engines() Out[23]: {'netcdf4': , 'h5netcdf': , 'scipy': , 'pseudonetcdf': , 'pydap': , 'store': , 'zarr': } # The public class is ZarrStore instead of ZarrBackendEntrypoint, how come? dir(xr.backends) Out[22]: ['AbstractDataStore', 'BackendArray', 'BackendEntrypoint', 'CachingFileManager', 'CfGribDataStore', 'DummyFileManager', 'FileManager', 'H5NetCDFStore', 'InMemoryDataStore', 'NetCDF4DataStore', 'NioDataStore', 'PseudoNetCDFDataStore', 'PydapDataStore', 'ScipyDataStore', 'ZarrStore', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'api', 'cfgrib_', 'common', 'file_manager', 'h5netcdf_', 'list_engines', 'locks', 'lru_cache', 'memory', 'netCDF4_', 'netcdf3', 'plugins', 'pseudonetcdf_', 'pydap_', 'pynio_', 'rasterio_', 'scipy_', 'store', 'zarr'] ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7049/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1419534239,PR_kwDOAMm_X85BWS-T,7196,Remove rasterio tutorial test,14371165,closed,0,,,0,2022-10-22T22:30:41Z,2022-10-23T11:57:36Z,2022-10-23T11:57:36Z,MEMBER,,0,pydata/xarray/pulls/7196,This test has been quite troublesome and since `.open_rasterio` has been deprecated since 0.20 I think it's fine removing the test.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7196/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1410534774,I_kwDOAMm_X85UEw12,7170,Scatter plots overlap in facetgrid in 3d,14371165,open,0,,,0,2022-10-16T16:06:56Z,2022-10-16T16:08:55Z,,MEMBER,,,,"### What happened? Any matplotlib gurus have any ideas how to nicely fit 3d plots in facetgrid? ```python ds = xr.tutorial.scatter_example_dataset(seed=42) fg = ds.plot.scatter(x=""A"", y=""B"", z=""z"", hue=""y"", markersize=""x"", row=""x"", col=""w"") ``` ![image](https://user-images.githubusercontent.com/14371165/196045673-ad6322d4-63f4-4f94-aca6-a4cfdc682fea.png) 2d looks fine: ```python fg = ds.plot.scatter(x=""A"", y=""B"", hue=""y"", markersize=""x"", row=""x"", col=""w"") ``` ![image](https://user-images.githubusercontent.com/14371165/196045774-5d850317-c58a-4fac-ae4b-04660a140fd1.png) ### What did you expect to happen? No plots overlapping each other, even if rotating the plots. ### Minimal Complete Verifiable Example _No response_ ### MVCE confirmation - [x] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [x] Complete example — the example is self-contained, including all data and the text of any traceback. - [x] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [x] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment
xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:30:19) [MSC v.1929 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: en LOCALE: ('Swedish_Sweden', '1252') libhdf5: 1.12.2 libnetcdf: 4.8.1 xarray: 2022.9.1.dev266+gbd01f9cc.d20221006 pandas: 1.5.0 numpy: 1.23.3 scipy: 1.9.1 netCDF4: 1.6.1 pydap: installed h5netcdf: 1.0.2 h5py: 3.7.0 Nio: None zarr: 2.13.2 cftime: 1.6.2 nc_time_axis: 1.4.1 PseudoNetCDF: 3.2.2 rasterio: 1.3.2 cfgrib: None iris: 3.3.0 bottleneck: 1.3.5 dask: 2022.9.2 distributed: 2022.9.2 matplotlib: 3.6.0 cartopy: 0.21.0 seaborn: 0.12.0 numbagg: 0.2.1 fsspec: 2022.8.2 cupy: None pint: 0.19.2 sparse: 0.13.0 flox: 0.5.10.dev21+g91b6e19 numpy_groupies: 0.9.19 setuptools: 65.4.1 pip: 22.2.2 conda: None pytest: 7.1.3 IPython: 7.33.0 sphinx: 5.2.3 C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn(""Setuptools is replacing distutils."")
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7170/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1386416145,PR_kwDOAMm_X84_n-Xi,7082,Clearer variable names in FacetGrid._set_lims,14371165,closed,0,,,0,2022-09-26T16:52:41Z,2022-09-26T20:50:18Z,2022-09-26T20:50:18Z,MEMBER,,0,pydata/xarray/pulls/7082,"* Fix outdated typing. * Clearer variable names.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7082/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1342259638,PR_kwDOAMm_X849WYHD,6926,Use micromamba in ASV benchmark workflow,14371165,closed,0,,,0,2022-08-17T20:27:44Z,2022-09-24T09:15:38Z,2022-09-24T09:15:38Z,MEMBER,,0,pydata/xarray/pulls/6926,"These changes should hopefully yield some performance improvements. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6926/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1339604345,PR_kwDOAMm_X849Nkuh,6918,"Generalize set_(x, y, z)labels in facetgrids",14371165,closed,0,,,0,2022-08-15T22:45:15Z,2022-08-17T17:33:19Z,2022-08-17T17:21:40Z,MEMBER,,0,pydata/xarray/pulls/6918,Prepare to be able to use a `.set_zlabels` in facetgrids. Reduces diffs in #6778.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6918/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1339578605,PR_kwDOAMm_X849NfsN,6917,Reuse total width calculation,14371165,closed,0,,,0,2022-08-15T22:21:31Z,2022-08-15T22:40:06Z,2022-08-15T22:40:06Z,MEMBER,,0,pydata/xarray/pulls/6917,"Minor tweak to reduce diffs in #6778. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6917/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1299275985,PR_kwDOAMm_X847HxFX,6764,Remove generic utils import,14371165,closed,0,,,0,2022-07-08T17:22:26Z,2022-08-12T09:07:23Z,2022-07-08T17:52:50Z,MEMBER,,0,pydata/xarray/pulls/6764,Some minor import oddities I noticed while reading the code.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6764/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1299306810,PR_kwDOAMm_X847H3r8,6765,Use `math` instead of `numpy` in some places,14371165,closed,0,,,0,2022-07-08T18:02:33Z,2022-08-12T09:07:12Z,2022-07-09T07:51:15Z,MEMBER,,0,pydata/xarray/pulls/6765,"Use `math` instead of `numpy` where possible, looks better and seems faster as well. Idea from https://github.com/pydata/xarray/pull/6702#discussion_r903986442, https://github.com/dask/dask/pull/9232 Example: ```python %timeit math.prod((1, 2, 3)) 161 ns ± 10.5 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) %timeit int(np.prod((1, 2, 3))) 11.9 µs ± 248 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6765/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1299416254,PR_kwDOAMm_X847IPRb,6767,Type `shape` methods,14371165,closed,0,,,0,2022-07-08T20:23:59Z,2022-08-12T09:06:53Z,2022-07-09T07:51:28Z,MEMBER,,0,pydata/xarray/pulls/6767,"The shape methods can have multiple integers inside the tuple, this fixes that and adds to typing to all shape methods I found.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6767/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1088740466,PR_kwDOAMm_X84wR4bX,6109,Remove registration of pandas datetime converter in plotting,14371165,closed,0,,,0,2021-12-26T10:14:47Z,2022-08-12T09:05:45Z,2022-01-09T20:33:29Z,MEMBER,,0,pydata/xarray/pulls/6109,"Back in 2017 the `register_pandas_datetime_converter_if_needed` was added to workaround matplotlib crashing when handling datetime objects, (#1669). The example that crashed back then was (#1661): ```python import xarray import numpy da = xarray.DataArray( numpy.arange(3*4).reshape(3,4), dims=(""x"", ""y""), coords={""x"": [1,2,3], ""y"": [numpy.datetime64(f""2000-01-{x:02d}"") for x in range(1, 5)]}) da.plot.pcolormesh() ``` This has probably been working by default in matplotlib since 2.2.0, when datetime support was added https://github.com/matplotlib/matplotlib/releases/tag/v2.2.0. (https://github.com/matplotlib/matplotlib/pull/9779) Related issues: https://github.com/mwaskom/seaborn/issues/1325 - [x] Closes #6102 - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6109/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1302560442,PR_kwDOAMm_X847Snca,6779,Move _infer_meta_data and _parse_size to utils,14371165,closed,0,,,0,2022-07-12T20:01:59Z,2022-08-12T09:03:53Z,2022-07-12T20:45:02Z,MEMBER,,0,pydata/xarray/pulls/6779,Reduce diffs in #6778.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6779/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1325613350,PR_kwDOAMm_X848fiwZ,6862,Add typing to some interval functions,14371165,closed,0,,,0,2022-08-02T10:02:57Z,2022-08-12T09:02:21Z,2022-08-02T20:43:08Z,MEMBER,,0,pydata/xarray/pulls/6862,"Reduce diffs in #6778. `_interval_to_double_bound_points` was returning a `list` instead of `ndarray` which I had some issues with. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6862/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1324163858,PR_kwDOAMm_X848auLe,6856,Better error message in _infer_meta_data,14371165,closed,0,,,0,2022-08-01T10:06:58Z,2022-08-12T09:01:36Z,2022-08-01T16:59:51Z,MEMBER,,0,pydata/xarray/pulls/6856,"Reduce diffs in #6778. I remember finding it annoying that I got a list of the valid strings but not the actual string used. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6856/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1332554764,PR_kwDOAMm_X8482bc3,6898,Fix mypy CI,14371165,closed,0,,,0,2022-08-09T00:35:19Z,2022-08-12T08:59:42Z,2022-08-09T01:30:24Z,MEMBER,,0,pydata/xarray/pulls/6898,"Fixes: ``` xarray/tests/test_backends_file_manager.py:56: error: Incompatible types in assignment (expression has type ""_GeneratorContextManager[Any]"", variable has type ""WarningsChecker"") [assignment] ``` Just added a ignore.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6898/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1318778491,PR_kwDOAMm_X848I-tg,6831,Convert name to string,14371165,closed,0,,,0,2022-07-26T21:38:32Z,2022-07-26T22:16:44Z,2022-07-26T21:38:54Z,MEMBER,,0,pydata/xarray/pulls/6831," - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6831/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 778083748,MDU6SXNzdWU3NzgwODM3NDg=,4761,Dataset.interp drops boolean variables,14371165,closed,0,,,0,2021-01-04T13:09:56Z,2021-05-13T15:28:15Z,2021-05-13T15:28:15Z,MEMBER,,,," **What happened**: `Dataset.interp` silently drops boolean variables. **What you expected to happen**: If I'm interpolating a group of variables I expect to get all of them back in the correct shape with relevant values in them. If the variables are boolean or object arrays I don't expect it to do linear interpolation because it doesn't make sense but stepwise interpolation like nearest or zero order interpolation should be fine to expect. **Minimal Complete Verifiable Example**: ```python import numpy as np a = np.arange(0, 5) b = np.core.defchararray.add(""long_variable_name"", a.astype(str)) coords = dict(time=da.array([0, 1])) data_vars = dict() for v in b: data_vars[v] = xr.DataArray( name=v, data=np.array([0, 1]).astype(bool), dims=[""time""], coords=coords, ) ds1 = xr.Dataset(data_vars) # Print raw data: print(ds1) Out[3]: Dimensions: (time: 2) Coordinates: * time (time) int32 0 1 Data variables: long_variable_name0 (time) bool False True long_variable_name1 (time) bool False True long_variable_name2 (time) bool False True long_variable_name3 (time) bool False True long_variable_name4 (time) bool False True # Interpolate: ds1 = ds1.interp( time=da.array([0, 0.5, 1, 2]), assume_sorted=True, method=""nearest"", kwargs=dict(fill_value=""extrapolate""), ) # Print interpolated data: Dimensions: (time: 4) Coordinates: * time (time) float64 0.0 0.5 1.0 2.0 Data variables: *empty* ``` **Anything else we need to know?**: `ds.interp_like `use `ds.reindex` in these cases which seems like a good choice in `ds.interp` as well. But I think that both `ds.interp` and `ds.interp_like` should fill by default with nearest value instead of np.nan because we're still requesting interpolation. **Environment**:
Output of xr.show_versions() xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows libhdf5: 1.10.4 libnetcdf: None xarray: 0.16.2 pandas: 1.1.5 numpy: 1.17.5 scipy: 1.4.1 netCDF4: None pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2020.12.0 distributed: 2020.12.0 matplotlib: 3.3.2 cartopy: None seaborn: 0.11.1 numbagg: None pint: None setuptools: 51.0.0.post20201207 pip: 20.3.3 conda: 4.9.2 pytest: 6.2.1 IPython: 7.19.0 sphinx: 3.4.0
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4761/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 791725552,MDU6SXNzdWU3OTE3MjU1NTI=,4838,Simplify adding custom backends,14371165,closed,0,,,0,2021-01-22T06:02:53Z,2021-04-15T02:02:03Z,2021-04-15T02:02:03Z,MEMBER,,,," **Is your feature request related to a problem? Please describe.** I've been working on opening custom hdf formats in xarray, reading up on the apiv2 it is currently only possible to declare a new external plugin in setup.py but that doesn't seem easy or intuitive to me. **Describe the solution you'd like** Why can't we simply be allowed to add functions to the engine parameter? Example: ```python from custom_backend import engine ds = xr.load_dataset(filename, engine=engine) ``` This seems like a small function change to me from my initial _quick_ look because there's mainly a bunch of string checks in the normal case until we get to the registered backend functions, if we send in a function instead in the engine-parameter we can just bypass those checks. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4838/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue