home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where author_association = "CONTRIBUTOR" and user = 900941 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

  • `xray.open_mfdataset` concatenates also variables without time dimension 4
  • groupby with datetime DataArray fails with `AttributeError` 2
  • data_vars option added to open_mfdataset 2
  • DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 1
  • time.units truncated when saving to_netcdf 1
  • Failing test, maybe it could be removed? 1

user 1

  • guziy · 11 ✖

author_association 1

  • CONTRIBUTOR · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
786735133 https://github.com/pydata/xarray/issues/1449#issuecomment-786735133 https://api.github.com/repos/pydata/xarray/issues/1449 MDEyOklzc3VlQ29tbWVudDc4NjczNTEzMw== guziy 900941 2021-02-26T16:01:15Z 2021-02-26T16:46:33Z CONTRIBUTOR

Hi, I have a similar problem. We have model runs starting at 0Z and 12Z so the ones starting at 0Z don't have time (only date) in the unit string, which is not consistent... Is there a workaround?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  time.units truncated when saving to_netcdf 235224055
331327013 https://github.com/pydata/xarray/issues/1584#issuecomment-331327013 https://api.github.com/repos/pydata/xarray/issues/1584 MDEyOklzc3VlQ29tbWVudDMzMTMyNzAxMw== guziy 900941 2017-09-22T01:40:06Z 2017-09-22T01:40:06Z CONTRIBUTOR

I have to mention that this test fails probably because of my ultra HD screen.

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Failing test, maybe it could be removed? 259606704
330672715 https://github.com/pydata/xarray/pull/1580#issuecomment-330672715 https://api.github.com/repos/pydata/xarray/issues/1580 MDEyOklzc3VlQ29tbWVudDMzMDY3MjcxNQ== guziy 900941 2017-09-19T21:02:53Z 2017-09-19T21:02:53Z CONTRIBUTOR

Thanks @spencerahill

py.test seems to be working

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  data_vars option added to open_mfdataset 258884482
330663981 https://github.com/pydata/xarray/pull/1580#issuecomment-330663981 https://api.github.com/repos/pydata/xarray/issues/1580 MDEyOklzc3VlQ29tbWVudDMzMDY2Mzk4MQ== guziy 900941 2017-09-19T20:29:58Z 2017-09-19T20:31:01Z CONTRIBUTOR

Thanks @spencerahill:

I have run the flake8 test and modified the whats-new.rst. I think I need more guidance with the tests. I tried using nosetests and get the following exceptions (I am sure I am doing smth wrong here):

``` $ nosetests /Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/matplotlib/init.py:917: UserWarning: axes.hold is deprecated. Please remove it from your matplotlibrc and/or style files. warnings.warn(self.msg_depr_set % key) /Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/matplotlib/rcsetup.py:152: UserWarning: axes.hold is deprecated, will be removed in 3.0 warnings.warn("axes.hold is deprecated, will be removed in 3.0") E ====================================================================== ERROR: Failure: AttributeError (module 'pytest' has no attribute 'config')


Traceback (most recent call last): File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/loader.py", line 417, in loadTestsFromName addr.filename, addr.module) File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/imp.py", line 244, in load_module return load_package(name, filename) File "/Users/huziy/anaconda/envs/py3.6/lib/python3.6/imp.py", line 216, in load_package return _load(spec) File "<frozen importlib._bootstrap>", line 675, in _load File "<frozen importlib._bootstrap>", line 655, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed File "/Users/huziy/PythonProjects/xarray/xarray/tests/init.py", line 130, in <module> _SKIP_FLAKY = not pytest.config.getoption("--run-flaky") AttributeError: module 'pytest' has no attribute 'config'


Ran 1 test in 0.582s

FAILED (errors=1) ```

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  data_vars option added to open_mfdataset 258884482
330592365 https://github.com/pydata/xarray/issues/438#issuecomment-330592365 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU5MjM2NQ== guziy 900941 2017-09-19T16:16:57Z 2017-09-19T16:16:57Z CONTRIBUTOR

Thanks @shoyer: Is there a how to contribute guide? I basically look for how to write a test and run test to check if my adding this option did not break anything...

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330580615 https://github.com/pydata/xarray/issues/438#issuecomment-330580615 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU4MDYxNQ== guziy 900941 2017-09-19T15:39:53Z 2017-09-19T15:40:40Z CONTRIBUTOR

This seems to be working, and no deprecation warning... (But probably I have to sort paths...)

```python In [8]: ds = xarray.concat([xarray.open_dataset(p, chunks={"time": 100}) for p in paths], data_vars="minimal", dim="time")

In [9]: ds Out[9]: <xarray.Dataset> Dimensions: (time: 13505, x: 782, y: 808) Coordinates: * x (x) float64 -4.556e+06 -4.546e+06 -4.536e+06 ... * y (y) float64 4.98e+06 4.97e+06 4.96e+06 4.95e+06 ... * time (time) datetime64[ns] 1993-01-01T12:00:09.140797440 ... Data variables: lon (y, x) float64 156.5 156.5 156.6 156.6 156.7 ... lat (y, x) float64 58.55 58.64 58.72 58.81 58.9 ... lambert_conformal_conic int16 -32767 tmin (time, y, x) float64 nan nan nan nan nan nan ...

In [10]: lon = ds["lon"]

In [11]: lon.ndim Out[11]: 2 ``` Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330569786 https://github.com/pydata/xarray/issues/438#issuecomment-330569786 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU2OTc4Ng== guziy 900941 2017-09-19T15:05:27Z 2017-09-19T15:05:49Z CONTRIBUTOR

Thanks @spencerahill : You are right, but the error message won't change, since the data_vars keyword is not known, and I am not able to change the dataset's attribute data_vars. I think I have to use concat explicitly...

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330567549 https://github.com/pydata/xarray/issues/438#issuecomment-330567549 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU2NzU0OQ== guziy 900941 2017-09-19T14:58:55Z 2017-09-19T14:58:55Z CONTRIBUTOR

Hi @shoyer:

where is this data_vars='minimal' set? or maybe I am using a wrong version of xarray? Here is what I get

```python

In [10]: ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4", data_vars="minimum")

TypeError Traceback (most recent call last) <ipython-input-10-ba844206f74a> in <module>() ----> 1 ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4", data_vars="minimum")

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, lock, **kwargs) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths:

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in <listcomp>(.0) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths:

TypeError: open_dataset() got an unexpected keyword argument 'data_vars'

In [11]: ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4")

In [12]: ds.data_vars = "minimum"

AttributeError Traceback (most recent call last) <ipython-input-12-9026b067946d> in <module>() ----> 1 ds.data_vars = "minimum"

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/core/common.py in setattr(self, name, value) 180 raise AttributeError( 181 "cannot set attribute %r on a %r object. Use setitem " --> 182 "style assignment (e.g., ds['name'] = ...) instead to " 183 "assign variables." % (name, type(self).name)) 184 object.setattr(self, name, value)

AttributeError: can't set attribute

In [13]: ds.data_vars Out[13]: Data variables: tmin (time, y, x) float64 nan nan nan nan nan nan ... lon (time, y, x) float64 156.5 156.5 156.6 156.6 ... lat (time, y, x) float64 58.55 58.64 58.72 58.81 ... lambert_conformal_conic (time) int64 -32767 -32767 -32767 -32767 -32767 ...

In [16]: xarray.version Out[16]: '0.9.6'

``` Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
268021977 https://github.com/pydata/xarray/issues/1132#issuecomment-268021977 https://api.github.com/repos/pydata/xarray/issues/1132 MDEyOklzc3VlQ29tbWVudDI2ODAyMTk3Nw== guziy 900941 2016-12-19T17:15:17Z 2016-12-19T17:15:17Z CONTRIBUTOR

Thanks, I'll try to use the github version.

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby with datetime DataArray fails with `AttributeError` 190683531
268020632 https://github.com/pydata/xarray/issues/1132#issuecomment-268020632 https://api.github.com/repos/pydata/xarray/issues/1132 MDEyOklzc3VlQ29tbWVudDI2ODAyMDYzMg== guziy 900941 2016-12-19T17:10:09Z 2016-12-19T17:10:09Z CONTRIBUTOR

Hi:

Here I have an example that have worked until recently...

https://github.com/guziy/PyNotebooks/blob/master/xarray/test_grouping.ipynb

Of course there is a resample function, but sometimes you want grouping...

Are there any plans to add a function as a key to the groupby function?

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby with datetime DataArray fails with `AttributeError` 190683531
252193599 https://github.com/pydata/xarray/issues/1041#issuecomment-252193599 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDI1MjE5MzU5OQ== guziy 900941 2016-10-07T09:26:28Z 2016-10-07T09:26:59Z CONTRIBUTOR

Hi @shoyer:

Does a2.resample("D", "time") work in your second example?

with a2.resample("D", "time") I get the following exception:

ValueError: 'time' not found in array dimensions ('t',)

but I think this is working as intended -- if you only supply the name of a dimension with integer labels, xarray has no way to know how what times to use for resampling.

I am not sure how it is done now or whether it is possible to implement, but I feel like it searches for the coordinate with the same name as the supplied dimension. Probably searching for a coordinate containing only the dimension specified in resample could do the trick.

Maybe there is a better way to do what I am trying to do?: I needed it to calculate daily means. But I have a hole in my data in the middle of the year and resample is masking this hole, by adding masked fields. So I've done it with groupby as follows, but it seems there should be an easier way to achieve this:

python day_dates = [datetime(d.year, d.month, d.day) for d in pd.to_datetime(snfl.coords["t"].values)] day_dates = DataArray(day_dates, name="time", dims="t") snfl = snfl.groupby(day_dates).mean(dim="t")

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708

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.744ms · About: xarray-datasette