issue_comments
7 rows where issue = 266133430 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- DataArray.argsort should be deleted · 7 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1463138999 | https://github.com/pydata/xarray/issues/1635#issuecomment-1463138999 | https://api.github.com/repos/pydata/xarray/issues/1635 | IC_kwDOAMm_X85XNbq3 | anton-seaice 79179784 | 2023-03-10T02:31:27Z | 2023-03-10T02:31:27Z | NONE | I agree that at least the index should show the reflect the order of the ranking found using argsort. ```python import xarray as xr import numpy as np np.random.rand(10) ds = xr.DataArray(np.random.rand(10) ) ds.argsort().dim_0 ``` returns
however it should return an array with the order of the elements ranked using argsort e.g.
Where ds[3] is the smallest value in ds and ds[0] is the biggest etc. The current behaviour is confusing / nonsenical. Return the index unchanged implies that the initial array is already ordered. ``` INSTALLED VERSIONScommit: None python: 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:20:04) [GCC 11.3.0] python-bits: 64 OS: Linux OS-release: 4.18.0-425.3.1.el8.nci.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: None LOCALE: ('en_US', 'UTF-8') libhdf5: 1.12.2 libnetcdf: 4.8.1 xarray: 2023.2.0 pandas: 1.5.3 numpy: 1.23.5 scipy: 1.9.3 netCDF4: 1.6.0 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.6.2 nc_time_axis: None PseudoNetCDF: None rasterio: 1.3.4 cfgrib: None iris: 3.3.1 bottleneck: None dask: 2022.11.0 distributed: 2022.11.0 matplotlib: 3.4.3 cartopy: 0.21.1 seaborn: None numbagg: None fsspec: 2022.11.0 cupy: None pint: None sparse: 0.13.0 flox: None numpy_groupies: None setuptools: 65.5.1 pip: 23.0.1 conda: None pytest: None mypy: None IPython: 8.6.0 sphinx: None ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
545261919 | https://github.com/pydata/xarray/issues/1635#issuecomment-545261919 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDU0NTI2MTkxOQ== | seth-p 7441788 | 2019-10-23T04:35:37Z | 2019-10-23T04:35:37Z | CONTRIBUTOR | I think this issue is still relevant. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
544830794 | https://github.com/pydata/xarray/issues/1635#issuecomment-544830794 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDU0NDgzMDc5NA== | stale[bot] 26384082 | 2019-10-22T06:58:59Z | 2019-10-22T06:58:59Z | NONE | In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
337672616 | https://github.com/pydata/xarray/issues/1635#issuecomment-337672616 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDMzNzY3MjYxNg== | seth-p 7441788 | 2017-10-18T17:48:28Z | 2017-10-18T18:36:25Z | CONTRIBUTOR | I'm not a fan of auto-flattening either, but that's what One option is to have |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
337631240 | https://github.com/pydata/xarray/issues/1635#issuecomment-337631240 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDMzNzYzMTI0MA== | shoyer 1217238 | 2017-10-18T15:31:56Z | 2017-10-18T15:31:56Z | MEMBER |
I'm not a huge fan of auto-flattening for xarray, but I can see this logic.
I would probably implement a new method for this, maybe |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
337623613 | https://github.com/pydata/xarray/issues/1635#issuecomment-337623613 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDMzNzYyMzYxMw== | seth-p 7441788 | 2017-10-18T15:08:57Z | 2017-10-18T15:08:57Z | CONTRIBUTOR | I think that makes sense, though I don't quite understand what would go in its place. Another possibility -- perhaps a bad one -- is to permute the values in the sorted dimension so that they match the resulting values (i.e. something like Note that Alternative suggestion: have BTW, I'm just thinking in terms of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 | |
337387398 | https://github.com/pydata/xarray/issues/1635#issuecomment-337387398 | https://api.github.com/repos/pydata/xarray/issues/1635 | MDEyOklzc3VlQ29tbWVudDMzNzM4NzM5OA== | shoyer 1217238 | 2017-10-17T22:04:26Z | 2017-10-17T22:19:51Z | MEMBER | It seems like another reasonable choice would be for I think this internal utility function is equivalent to your second argsort: https://github.com/pydata/xarray/blob/2949558b75a65404a500a237ec54834fd6946d07/xarray/core/nputils.py#L38-L55 In practice, we might use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DataArray.argsort should be deleted 266133430 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 4