home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

20 rows where user = 23625371 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 6

  • Numpy string coding 10
  • Open mfdataset with long time axis 3
  • Update combine error 3
  • Decoding year 1 time 2
  • BUG: Future time decoding 1
  • Duplicate values on unstack 1

user 1

  • znicholls · 20 ✖

author_association 1

  • CONTRIBUTOR 20
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1263016285 https://github.com/pydata/xarray/issues/7104#issuecomment-1263016285 https://api.github.com/repos/pydata/xarray/issues/7104 IC_kwDOAMm_X85LSBld znicholls 23625371 2022-09-30T02:00:44Z 2022-09-30T02:00:44Z CONTRIBUTOR

Ok great thanks, solutions sound good

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Duplicate values on unstack 1390228572
931822464 https://github.com/pydata/xarray/pull/5264#issuecomment-931822464 https://api.github.com/repos/pydata/xarray/issues/5264 IC_kwDOAMm_X843inuA znicholls 23625371 2021-10-01T01:27:24Z 2021-10-01T01:27:24Z CONTRIBUTOR

@lewisjarednz fyi

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
931822417 https://github.com/pydata/xarray/pull/5264#issuecomment-931822417 https://api.github.com/repos/pydata/xarray/issues/5264 IC_kwDOAMm_X843intR znicholls 23625371 2021-10-01T01:27:15Z 2021-10-01T01:27:15Z CONTRIBUTOR

@shoyer can I bother you again now that CI is passing please?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
927232092 https://github.com/pydata/xarray/pull/5776#issuecomment-927232092 https://api.github.com/repos/pydata/xarray/issues/5776 IC_kwDOAMm_X843RHBc znicholls 23625371 2021-09-26T04:59:24Z 2021-09-26T04:59:24Z CONTRIBUTOR

The only other thing this needs is a test to check that the error is raised with the correct message (i.e. pytest.raises(TypeError, match="may fix this issue")

I believe that's covered by https://github.com/pydata/xarray/blob/ec2657bfc1a426aa3559243b02ecf48de6673506/xarray/tests/test_combine.py#L1109 (i.e. no change is needed to the existing code)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update combine error 990509161
927108350 https://github.com/pydata/xarray/pull/5776#issuecomment-927108350 https://api.github.com/repos/pydata/xarray/issues/5776 IC_kwDOAMm_X843Qoz- znicholls 23625371 2021-09-25T11:35:37Z 2021-09-25T11:35:37Z CONTRIBUTOR

Alrighty updated, see what you think

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update combine error 990509161
914762048 https://github.com/pydata/xarray/pull/5776#issuecomment-914762048 https://api.github.com/repos/pydata/xarray/issues/5776 IC_kwDOAMm_X842hilA znicholls 23625371 2021-09-08T01:13:06Z 2021-09-08T01:13:06Z CONTRIBUTOR

We could try and tighten this up in a few ways (I'm not sure how much effort it is worth):

  • only talk about cf_time if the error is in the time dimension (or if one of the types is cftime.datetime)
  • only talk about cf_time if the function which tried to do the combining actually has this argument (e.g. combine_by_coords doesn't have use_cftime, only open_mfdataset does so the current implementation could be confusing), to do this I'd use a try except block further up the stack rather than altering the message in _ensure_same_types

Thoughts @mathause and @TomNicholas ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update combine error 990509161
914754778 https://github.com/pydata/xarray/pull/5767#issuecomment-914754778 https://api.github.com/repos/pydata/xarray/issues/5767 IC_kwDOAMm_X842hgza znicholls 23625371 2021-09-08T01:06:28Z 2021-09-08T01:06:28Z CONTRIBUTOR

Thanks @TomNicholas and @mathause. I've opened a new PR (#5776), turns out all the tests are well setup already, I just needed to be told where to look. Cheers!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Open mfdataset with long time axis 988426640
913098489 https://github.com/pydata/xarray/pull/5767#issuecomment-913098489 https://api.github.com/repos/pydata/xarray/issues/5767 IC_kwDOAMm_X842bMb5 znicholls 23625371 2021-09-05T07:07:16Z 2021-09-05T07:07:16Z CONTRIBUTOR

use_cftime=True

I knew there must be a more elegant option, thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Open mfdataset with long time axis 988426640
913089052 https://github.com/pydata/xarray/pull/5767#issuecomment-913089052 https://api.github.com/repos/pydata/xarray/issues/5767 IC_kwDOAMm_X842bKIc znicholls 23625371 2021-09-05T05:19:45Z 2021-09-05T05:19:45Z CONTRIBUTOR

@mathause what do you think?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Open mfdataset with long time axis 988426640
882924370 https://github.com/pydata/xarray/pull/5264#issuecomment-882924370 https://api.github.com/repos/pydata/xarray/issues/5264 IC_kwDOAMm_X840oFtS znicholls 23625371 2021-07-19T23:19:01Z 2021-07-19T23:19:01Z CONTRIBUTOR

Ignoring failing CI due to fsspec (see https://github.com/pydata/xarray/pull/5615#issuecomment-881679900)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
879538970 https://github.com/pydata/xarray/pull/5264#issuecomment-879538970 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDg3OTUzODk3MA== znicholls 23625371 2021-07-14T02:35:18Z 2021-07-14T02:35:18Z CONTRIBUTOR

xarray/tests/test_backends.py::test_open_fsspec appears to fail because of the release of ffspec 2021.7.0 so this PR will probably have to wait until a fix for that is added (presumably elsewhere to keep the changes clear).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
879533808 https://github.com/pydata/xarray/pull/5264#issuecomment-879533808 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDg3OTUzMzgwOA== znicholls 23625371 2021-07-14T02:19:55Z 2021-07-14T02:20:27Z CONTRIBUTOR

Something like 59ed7d5? (Obviously missing proper tests but just to get a sense of whether the idea is plausible)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
879517988 https://github.com/pydata/xarray/pull/5264#issuecomment-879517988 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDg3OTUxNzk4OA== znicholls 23625371 2021-07-14T01:41:38Z 2021-07-14T01:41:38Z CONTRIBUTOR

I tried pushing a fix. It's unclear to me whether the change should be in how the dtypes are inferred (given that the inference code seems to do what it is meant to...) or whether is_unicode_dtype simply needs to be updated to know about np.str_ (which is the fix I just tried).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
833233473 https://github.com/pydata/xarray/pull/5264#issuecomment-833233473 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDgzMzIzMzQ3Mw== znicholls 23625371 2021-05-06T05:21:19Z 2021-07-14T01:08:18Z CONTRIBUTOR

What problem are you trying to solve here?

Somehow I ended up with np.str_ in a pandas dataframe (how is unclear to me but this seems to be a valid string type), which then exploded when I converted to xarray and attempted to save as netCDF. Minimal example below.

```python import numpy as np import pandas as pd

I don't know how the strings ended up being np.str_....

scenarios = [np.str_(v) for v in ["scenario_a", "scenario_b", "scenario_c"]] years = range(2015, 2100 + 1) tdf = pd.DataFrame( data=np.random.random((len(scenarios), len(years))), columns=years, index=scenarios, ) tdf.index.name = "scenario" tdf.columns.name = "year" tdf = tdf.stack() tdf.name = "tas"

txr = tdf.to_xarray()

raises error shown below

txr.to_netcdf("test.nc")

error

Traceback (most recent call last): File "scratch.py", line 20, in <module> txr.to_netcdf("test.nc") File ".../lib/python3.7/site-packages/xarray/core/dataarray.py", line 2741, in to_netcdf return dataset.to_netcdf(args, *kwargs) File ".../lib/python3.7/site-packages/xarray/core/dataset.py", line 1699, in to_netcdf invalid_netcdf=invalid_netcdf, File ".../lib/python3.7/site-packages/xarray/backends/api.py", line 1108, in to_netcdf dataset, store, writer, encoding=encoding, unlimited_dims=unlimited_dims File ".../lib/python3.7/site-packages/xarray/backends/api.py", line 1154, in dump_to_store store.store(variables, attrs, check_encoding, writer, unlimited_dims=unlimited_dims) File ".../lib/python3.7/site-packages/xarray/backends/common.py", line 256, in store variables, check_encoding_set, writer, unlimited_dims=unlimited_dims File ".../lib/python3.7/site-packages/xarray/backends/common.py", line 294, in set_variables name, v, check, unlimited_dims=unlimited_dims File ".../lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 464, in prepare_variable variable, self.format, raise_on_invalid_encoding=check_encoding File ".../lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 131, in get_datatype datatype = _nc4_dtype(var) File ".../lib/python3.7/site-packages/xarray/backends/netCDF4.py", line 154, in _nc4_dtype raise ValueError(f"unsupported dtype for netCDF4 variable: {var.dtype}") ValueError: unsupported dtype for netCDF4 variable: object ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
848597492 https://github.com/pydata/xarray/pull/5264#issuecomment-848597492 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDg0ODU5NzQ5Mg== znicholls 23625371 2021-05-26T08:58:23Z 2021-05-26T08:58:23Z CONTRIBUTOR

I agree, this should totally work. It's not obvious to me how to best fix it, though.

I assume it's not as trivial as just changing e.g. https://github.com/pydata/xarray/blob/f9a535c130615fe81379d785dffcc6c814fc1126/xarray/coding/strings.py#L32 to also know about np.str_?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
848517059 https://github.com/pydata/xarray/pull/5264#issuecomment-848517059 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDg0ODUxNzA1OQ== znicholls 23625371 2021-05-26T06:55:48Z 2021-05-26T06:55:48Z CONTRIBUTOR

@shoyer any further thoughts on this now that the scope is clearer?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
833182029 https://github.com/pydata/xarray/pull/5264#issuecomment-833182029 https://api.github.com/repos/pydata/xarray/issues/5264 MDEyOklzc3VlQ29tbWVudDgzMzE4MjAyOQ== znicholls 23625371 2021-05-06T02:37:57Z 2021-05-06T02:37:57Z CONTRIBUTOR

So far I've just added a single test which fails. I don't think the test should fail although I'm not sure what the np.str_ type actually is so maybe this isn't a bug? Help/advice greatly appreciated.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Numpy string coding 877016428
801871642 https://github.com/pydata/xarray/pull/5050#issuecomment-801871642 https://api.github.com/repos/pydata/xarray/issues/5050 MDEyOklzc3VlQ29tbWVudDgwMTg3MTY0Mg== znicholls 23625371 2021-03-18T12:02:09Z 2021-03-18T12:02:09Z CONTRIBUTOR

If you can just add a what's new entry, I think this is ready to go!

Done, thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG: Future time decoding 834380377
716449448 https://github.com/pydata/xarray/pull/4506#issuecomment-716449448 https://api.github.com/repos/pydata/xarray/issues/4506 MDEyOklzc3VlQ29tbWVudDcxNjQ0OTQ0OA== znicholls 23625371 2020-10-26T10:15:07Z 2020-10-26T10:15:07Z CONTRIBUTOR

Wicked thanks everyone!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Decoding year 1 time 719881097
707520138 https://github.com/pydata/xarray/pull/4506#issuecomment-707520138 https://api.github.com/repos/pydata/xarray/issues/4506 MDEyOklzc3VlQ29tbWVudDcwNzUyMDEzOA== znicholls 23625371 2020-10-13T06:28:16Z 2020-10-13T06:28:16Z CONTRIBUTOR

I am not sure what is causing the CI failure, I don't think it's related to my changes

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Decoding year 1 time 719881097

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 15.541ms · About: xarray-datasette