{"database": "github", "table": "issues", "is_view": false, "human_description_en": "where comments = 2, state = \"open\" and user = 35968931 sorted by updated_at descending", "rows": [[2267780811, "PR_kwDOAMm_X85t8kgX", 8979, "Warn on automatic coercion to coordinate variables in Dataset constructor", 35968931, "open", 0, null, null, 2, "2024-04-28T19:44:20Z", "2024-04-29T21:13:00Z", null, "MEMBER", null, 0, "pydata/xarray/pulls/8979", "<!-- Feel free to remove check-list items aren't relevant to your change -->\r\n\r\n- [x] Starts the deprecation cycle for #8959\r\n- [x] Tests added\r\n- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`\r\n- [ ] ~~New functions/methods are listed in `api.rst`~~\r\n- [ ] Change existing code + examples so as not to emit this new warning everywhere.\r\n", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/8979/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "pull"], [2027231531, "I_kwDOAMm_X8541Rkr", 8524, "PR labeler bot broken and possibly dead", 35968931, "open", 0, null, null, 2, "2023-12-05T22:23:44Z", "2023-12-06T15:33:42Z", null, "MEMBER", null, null, null, "### What is your issue?\n\nThe PR labeler bot seems to be broken\r\n\r\nhttps://github.com/pydata/xarray/actions/runs/7107212418/job/19348227101?pr=8404\r\n\r\nand even worse the repository has been archived!\r\n\r\nhttps://github.com/andymckay/labeler\r\n\r\nI actually like this bot, but unless a similar bot exists somewhere else I guess we should just delete this action \ud83d\ude1e ", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/8524/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, "reopened", 13221727, "issue"], [1790161818, "PR_kwDOAMm_X85UvI4i", 7963, "Suggest installing dask when not discovered by ChunkManager", 35968931, "open", 0, null, null, 2, "2023-07-05T19:34:06Z", "2023-10-16T13:31:44Z", null, "MEMBER", null, 0, "pydata/xarray/pulls/7963", "<!-- Feel free to remove check-list items aren't relevant to your change -->\r\n\r\n- [x] Closes #7962\r\n- [ ] Tests added\r\n- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`\r\n- [ ] ~~New functions/methods are listed in `api.rst`~~\r\n", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/7963/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "pull"], [1812188730, "I_kwDOAMm_X85sA846", 8004, "Rotation Functional Index example", 35968931, "open", 0, null, null, 2, "2023-07-19T15:23:20Z", "2023-08-24T13:26:56Z", null, "MEMBER", null, null, null, "### Is your feature request related to a problem?\n\nI'm trying to think of an example that would demonstrate the \"functional index\" pattern discussed in https://github.com/pydata/xarray/issues/3620.\r\n\r\nI think a 2D rotation is the simplest example of an analytically-expressible, non-trivial, domain-agnostic case where you might want to back a set of multiple coordinates with a single functional index. It's also nice because there is additional information that must be passed and stored (the angle of the rotation), but that part is very simple, and domain-agnostic. I'm proposing we make this example work and put it in the custom index docs.\r\n\r\nI had a go at making that example ([notebook here](https://gist.github.com/TomNicholas/daa15f71e38f07259c6c2e251d0fb38e)) @benbovy, but I'm confused about a couple of things:\r\n\r\n1) How do I implement `.sel` in such a way that it supports indexing with slices (i.e. to crop my image)\r\n2) How can I make this lazy?\r\n3) Should the implementation be a \"MetaIndex\" (i.e. wrapping some pandas indexes)?\n\n### Describe the solution you'd like\n\n_No response_\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\nThis example is inspired by @jni's use case in napari, where (IIUC) they want to do a lazy functional affine transformation from pixel to physical coordinates, where the simplest example of such a transform might be a linear shear (caused by the imaging focal plane being at an angle to the physical sample).", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/8004/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "issue"], [1742035781, "I_kwDOAMm_X85n1VtF", 7894, "Can a \"skipna\" argument be added for Dataset.integrate() and DataArray.integrate()?", 35968931, "open", 0, null, null, 2, "2023-06-05T15:32:35Z", "2023-06-05T21:59:45Z", null, "MEMBER", null, null, null, "### Discussed in https://github.com/pydata/xarray/discussions/5283\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **chfite** May  9, 2021</sup>\r\nI am using the Dataset.integrate() function and noticed that because one of my variables has a NaN in it the function returns a NaN for the integrated value for that variable. I know based on the trapezoidal rule one could not get an integrated value at the location of the NaN, but is it not possible for it to calculate the integrated values where there were regular values?\r\n\r\nAssuming 0 for NaNs does not work because it would still integrate between the values before and after 0 and add additional area I do not want. Using DataArray.dropna() also is not sufficient because it would assume the value before the NaN is then connected to the value after the NaN and again add additional area that I would not want included. \r\n\r\nIf a \"skipna\" functionality or something could not be added to the integrate function, does anyone have a suggestion for another way to get around to calculating my integrated area while excluding the NaNs? </div>", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/7894/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "issue"], [1188523721, "I_kwDOAMm_X85G127J", 6431, "Bug when padding coordinates with NaNs", 35968931, "open", 0, null, null, 2, "2022-03-31T18:57:16Z", "2023-03-30T13:33:10Z", null, "MEMBER", null, null, null, "### What happened?\n\n```python\r\nda = xr.DataArray(np.arange(9), dim='x')\r\nda.pad({'x': (0, 1)}, 'constant', constant_values=np.NAN)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\nInput In [12], in <cell line: 1>()\r\n----> 1 da.pad({'x': 1}, 'constant', constant_values=np.NAN)\r\n\r\nFile ~/Documents/Work/Code/xarray/xarray/core/dataarray.py:4158, in DataArray.pad(self, pad_width, mode, stat_length, constant_values, end_values, reflect_type, **pad_width_kwargs)\r\n   4000 def pad(\r\n   4001     self,\r\n   4002     pad_width: Mapping[Any, int | tuple[int, int]] | None = None,\r\n   (...)\r\n   4012     **pad_width_kwargs: Any,\r\n   4013 ) -> DataArray:\r\n   4014     \"\"\"Pad this array along one or more dimensions.\r\n   4015 \r\n   4016     .. warning::\r\n   (...)\r\n   4156         z        (x) float64 nan 100.0 200.0 nan\r\n   4157     \"\"\"\r\n-> 4158     ds = self._to_temp_dataset().pad(\r\n   4159         pad_width=pad_width,\r\n   4160         mode=mode,\r\n   4161         stat_length=stat_length,\r\n   4162         constant_values=constant_values,\r\n   4163         end_values=end_values,\r\n   4164         reflect_type=reflect_type,\r\n   4165         **pad_width_kwargs,\r\n   4166     )\r\n   4167     return self._from_temp_dataset(ds)\r\n\r\nFile ~/Documents/Work/Code/xarray/xarray/core/dataset.py:7368, in Dataset.pad(self, pad_width, mode, stat_length, constant_values, end_values, reflect_type, **pad_width_kwargs)\r\n   7366     variables[name] = var\r\n   7367 elif name in self.data_vars:\r\n-> 7368     variables[name] = var.pad(\r\n   7369         pad_width=var_pad_width,\r\n   7370         mode=mode,\r\n   7371         stat_length=stat_length,\r\n   7372         constant_values=constant_values,\r\n   7373         end_values=end_values,\r\n   7374         reflect_type=reflect_type,\r\n   7375     )\r\n   7376 else:\r\n   7377     variables[name] = var.pad(\r\n   7378         pad_width=var_pad_width,\r\n   7379         mode=coord_pad_mode,\r\n   7380         **coord_pad_options,  # type: ignore[arg-type]\r\n   7381     )\r\n\r\nFile ~/Documents/Work/Code/xarray/xarray/core/variable.py:1360, in Variable.pad(self, pad_width, mode, stat_length, constant_values, end_values, reflect_type, **pad_width_kwargs)\r\n   1357 if reflect_type is not None:\r\n   1358     pad_option_kwargs[\"reflect_type\"] = reflect_type  # type: ignore[assignment]\r\n-> 1360 array = np.pad(  # type: ignore[call-overload]\r\n   1361     self.data.astype(dtype, copy=False),\r\n   1362     pad_width_by_index,\r\n   1363     mode=mode,\r\n   1364     **pad_option_kwargs,\r\n   1365 )\r\n   1367 return type(self)(self.dims, array)\r\n\r\nFile <__array_function__ internals>:5, in pad(*args, **kwargs)\r\n\r\nFile ~/miniconda3/envs/py39/lib/python3.9/site-packages/numpy/lib/arraypad.py:803, in pad(array, pad_width, mode, **kwargs)\r\n    801     for axis, width_pair, value_pair in zip(axes, pad_width, values):\r\n    802         roi = _view_roi(padded, original_area_slice, axis)\r\n--> 803         _set_pad_area(roi, axis, width_pair, value_pair)\r\n    805 elif mode == \"empty\":\r\n    806     pass  # Do nothing as _pad_simple already returned the correct result\r\n\r\nFile ~/miniconda3/envs/py39/lib/python3.9/site-packages/numpy/lib/arraypad.py:147, in _set_pad_area(padded, axis, width_pair, value_pair)\r\n    130 \"\"\"\r\n    131 Set empty-padded area in given dimension.\r\n    132 \r\n   (...)\r\n    144     broadcastable to the shape of `arr`.\r\n    145 \"\"\"\r\n    146 left_slice = _slice_at_axis(slice(None, width_pair[0]), axis)\r\n--> 147 padded[left_slice] = value_pair[0]\r\n    149 right_slice = _slice_at_axis(\r\n    150     slice(padded.shape[axis] - width_pair[1], None), axis)\r\n    151 padded[right_slice] = value_pair[1]\r\n\r\nValueError: cannot convert float NaN to integer\r\n```\n\n### What did you expect to happen?\n\nIt should have successfully padded with a NaN, same as it does if you don't specify `constant_values`:\r\n\r\n```python\r\nIn [14]: da.pad({'x': (0, 1)}, 'constant')\r\nOut[14]: \r\n<xarray.DataArray (x: 3)>\r\narray([ 0.,  1., nan])\r\nDimensions without coordinates: x\r\n```\r\n\n\n### Minimal Complete Verifiable Example\n\n_No response_\n\n### Relevant log output\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_\n\n### Environment\n\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) \r\n[GCC 9.4.0]\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 5.11.0-7620-generic\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\nLOCALE: ('en_US', 'UTF-8')\r\nlibhdf5: 1.12.1\r\nlibnetcdf: 4.8.1\r\n\r\nxarray: 0.20.3.dev4+gdbc02d4e\r\npandas: 1.4.0\r\nnumpy: 1.21.4\r\nscipy: 1.7.3\r\nnetCDF4: 1.5.8\r\npydap: None\r\nh5netcdf: None\r\nh5py: None\r\nNio: None\r\nzarr: 2.10.3\r\ncftime: 1.5.1.1\r\nnc_time_axis: None\r\nPseudoNetCDF: None\r\nrasterio: None\r\ncfgrib: None\r\niris: None\r\nbottleneck: None\r\ndask: 2022.01.1\r\ndistributed: 2022.01.1\r\nmatplotlib: None\r\ncartopy: None\r\nseaborn: None\r\nnumbagg: None\r\nfsspec: 2022.01.0\r\ncupy: None\r\npint: None\r\nsparse: None\r\nsetuptools: 59.6.0\r\npip: 21.3.1\r\nconda: 4.11.0\r\npytest: 6.2.5\r\nIPython: 8.2.0\r\nsphinx: 4.4.0", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/6431/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "issue"], [446054247, "MDU6SXNzdWU0NDYwNTQyNDc=", 2975, "Inconsistent/confusing behaviour when concatenating dimension coords", 35968931, "open", 0, null, null, 2, "2019-05-20T11:01:37Z", "2021-07-08T17:42:52Z", null, "MEMBER", null, null, null, "I noticed that with multiple conflicting dimension coords then concat can give pretty weird/counterintuitive results, at least compared to what the documentation suggests they should give:\r\n\r\n```python\r\n# Create two datasets with conflicting coordinates\r\nobjs = [Dataset({'x': [0], 'y': [1]}), Dataset({'y': [0], 'x': [1]})]\r\n\r\n[<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Coordinates:\r\n   * x        (x) int64 0\r\n   * y        (y) int64 1\r\n Data variables:\r\n     *empty*, \r\n<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Coordinates:\r\n   * y        (y) int64 0\r\n   * x        (x) int64 1\r\n Data variables:\r\n     *empty*]\r\n```\r\n\r\n```python\r\n# Try to join along only 'x',\r\n# coords='minimal' so concatenate \"Only coordinates in which the dimension already appears\"\r\nconcat(objs, dim='x', coords='minimal') \r\n\r\n<xarray.Dataset>\r\nDimensions:  (x: 2, y: 2)\r\nCoordinates:\r\n  * y        (y) int64 0 1\r\n  * x        (x) int64 0 1\r\nData variables:\r\n    *empty*\r\n\r\n# It's joined along x and y! \r\n```\r\n\r\nBased on my reading of the [docstring for concat](http://xarray.pydata.org/en/stable/generated/xarray.concat.html), I would have expected this to not attempt to concatenate y, because `coords='minimal'`, and instead to throw an error because 'y' is a \"non-concatenated variable\" whose values are not the same across datasets.\r\n\r\nNow let's try to get concat to broadcast 'y' across 'x':\r\n\r\n```python\r\n# Try to join along only 'x' by setting coords='different'\r\nconcat(objs, dim='x', coords='different') \r\n```\r\n\r\nNow as \"Data variables which are not equal (ignoring attributes) across all datasets are also concatenated\" then I would have expected 'y' to be concatenated across 'x', i.e. to add the 'x' dimension to the 'y' coord, i.e:\r\n\r\n```python\r\n<xarray.Dataset>\r\nDimensions:  (x: 2, y: 1)\r\nCoordinates:\r\n  * y        (y, x) int64 1 0\r\n  * x        (x)    int64 0 1\r\nData variables:\r\n    *empty*\r\n```\r\nBut that's not what we get!:\r\n```\r\n<xarray.Dataset>\r\nDimensions:  (x: 2, y: 2)\r\nCoordinates:\r\n  * y        (y) int64 0 1\r\n  * x        (x) int64 0 1\r\nData variables:\r\n    *empty*\r\n```\r\n\r\n### Same again but without dimension coords\r\n\r\nIf we create the same sort of objects but the variables are data vars not coords, then everything behaves exactly as expected:\r\n\r\n```python\r\nobjs2 = [Dataset({'a': ('x', [0]), 'b': ('y', [1])}), Dataset({'a': ('x', [1]), 'b': ('y', [0])})]\r\n\r\n[<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Dimensions without coordinates: x, y\r\n Data variables:\r\n     a        (x) int64 0\r\n     b        (y) int64 1, \r\n<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Dimensions without coordinates: x, y\r\n Data variables:\r\n     a        (x) int64 1\r\n     b        (y) int64 0]\r\n\r\nconcat(objs2, dim='x', data_vars='minimal')\r\n\r\nValueError: variable b not equal across datasets\r\n\r\nconcat(objs2, dim='x', data_vars='different')\r\n\r\n<xarray.Dataset>\r\nDimensions:  (x: 2, y: 1)\r\nDimensions without coordinates: x, y\r\nData variables:\r\n    a        (x) int64 0 1\r\n    b        (x, y) int64 1 0\r\n```\r\n\r\nAlso if you do the same again but with coordinates which are not dimension coords, i.e:\r\n\r\n```python\r\nobjs3 = [Dataset(coords={'a': ('x', [0]), 'b': ('y', [1])}), Dataset(coords={'a': ('x', [1]), 'b': ('y', [0])})]\r\n\r\n[<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Coordinates:\r\n     a        (x) int64 0\r\n     b        (y) int64 1\r\n Dimensions without coordinates: x, y\r\n Data variables:\r\n     *empty*, \r\n<xarray.Dataset>\r\n Dimensions:  (x: 1, y: 1)\r\n Coordinates:\r\n     a        (x) int64 1\r\n     b        (y) int64 0\r\n Dimensions without coordinates: x, y\r\n Data variables:\r\n     *empty*]\r\n```\r\nthen this again gives the expected concatenation behaviour.\r\n\r\nSo this implies that the compatibility checks that are being done on the data vars are not being done on the coords, but only if they are dimension coordinates! \r\n\r\nEither this is not the desired behaviour or the concat docstring needs to be a lot clearer. If we agree that this is not the desired behaviour then I will have a look inside `concat` to work out why it's happening.\r\n\r\nEDIT: Presumably this has something to do with the ToDo in the code for `concat`: `# TODO: support concatenating scalar coordinates even if the concatenated dimension already exists`...", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/2975/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, null, 13221727, "issue"]], "truncated": false, "filtered_table_rows_count": 7, "expanded_columns": [], "expandable_columns": [[{"column": "repo", "other_table": "repos", "other_column": "id"}, "name"], [{"column": "milestone", "other_table": "milestones", "other_column": "id"}, "title"], [{"column": "assignee", "other_table": "users", "other_column": "id"}, "login"], [{"column": "user", "other_table": "users", "other_column": "id"}, "login"]], "columns": ["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"], "primary_keys": ["id"], "units": {}, "query": {"sql": "select 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 from issues where \"comments\" = :p0 and \"state\" = :p1 and \"user\" = :p2 order by updated_at desc limit 101", "params": {"p0": "2", "p1": "open", "p2": "35968931"}}, "facet_results": {"state": {"name": "state", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?comments=2&state=open&user=35968931", "results": [{"value": "open", "label": "open", "count": 7, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&user=35968931", "selected": true}], "truncated": false}, "repo": {"name": "repo", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?comments=2&state=open&user=35968931", "results": [{"value": 13221727, "label": "xarray", "count": 7, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&state=open&user=35968931&repo=13221727", "selected": false}], "truncated": false}, "type": {"name": "type", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?comments=2&state=open&user=35968931", "results": [{"value": "issue", "label": "issue", "count": 5, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&state=open&user=35968931&type=issue", "selected": false}, {"value": "pull", "label": "pull", "count": 2, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&state=open&user=35968931&type=pull", "selected": false}], "truncated": false}}, "suggested_facets": [{"name": "created_at", "type": "date", "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&state=open&user=35968931&_facet_date=created_at"}, {"name": "updated_at", "type": "date", "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?comments=2&state=open&user=35968931&_facet_date=updated_at"}], "next": null, "next_url": null, "private": false, "allow_execute_sql": true, "query_ms": 24.547738954424858}