home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER" and issue = 285294506 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • shoyer 4

issue 1

  • Couldn't change values for on-disk datasets opened by open_mfdataset() (xarray > 0.8.2) · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
354810393 https://github.com/pydata/xarray/issues/1805#issuecomment-354810393 https://api.github.com/repos/pydata/xarray/issues/1805 MDEyOklzc3VlQ29tbWVudDM1NDgxMDM5Mw== shoyer 1217238 2018-01-02T16:41:46Z 2018-01-02T16:41:46Z MEMBER

@mobigroup copy(deep=True) makes an independent copy but again (as of #1024) does not load data into memory. You need to use .compute() or .load() to load the dask arrays into memory.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Couldn't change values for on-disk datasets opened by open_mfdataset() (xarray > 0.8.2) 285294506
354705941 https://github.com/pydata/xarray/issues/1805#issuecomment-354705941 https://api.github.com/repos/pydata/xarray/issues/1805 MDEyOklzc3VlQ29tbWVudDM1NDcwNTk0MQ== shoyer 1217238 2018-01-02T05:40:38Z 2018-01-02T05:57:03Z MEMBER

OK, I can reproduce this. The problem is assigning to specific elements of .values when a DataArray's data is not stored as a NumPy array, e.g., if it is a dask array or one of xarray's lazy array classes (used internally for lazy access when opening netCDF files). In practice, this arises with open_mfdataset() or open_dataset(..., cache=False).

It's not entirely obvious how to fix this. Probably the simplest fix is to make .values a readonly numpy array in these cases, so that an error is raised in these cases. This would usually works, but could lead to issues with passing arrays to scikit-learn or pandas due to a Cython bug with read-only memoryview buffers (https://github.com/cython/cython/issues/1605).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Couldn't change values for on-disk datasets opened by open_mfdataset() (xarray > 0.8.2) 285294506
354706872 https://github.com/pydata/xarray/issues/1805#issuecomment-354706872 https://api.github.com/repos/pydata/xarray/issues/1805 MDEyOklzc3VlQ29tbWVudDM1NDcwNjg3Mg== shoyer 1217238 2018-01-02T05:56:23Z 2018-01-02T05:56:33Z MEMBER

Hm, I tested with "cache=True" but it still doesn't work.

I meant open_dataset(cache=False) (it arises with either value for cache for open_mfdataset).

So old code is broken now.

Yes, this is an unfortunate/unintended consequence of https://github.com/pydata/xarray/pull/1024 ("Disable automatic cache with dask").

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Couldn't change values for on-disk datasets opened by open_mfdataset() (xarray > 0.8.2) 285294506
354674571 https://github.com/pydata/xarray/issues/1805#issuecomment-354674571 https://api.github.com/repos/pydata/xarray/issues/1805 MDEyOklzc3VlQ29tbWVudDM1NDY3NDU3MQ== shoyer 1217238 2018-01-01T20:28:59Z 2018-01-01T20:28:59Z MEMBER

Can you share full information for how you created this dataset? I cannot reproduce this: ``` In [36]: test = xr.DataArray(np.ones(10), ...: coords={ ...: 'x': range(10) ...: }, ...: dims=['x'] ...: ).chunk() ...:

In [37]: test Out[37]: <xarray.DataArray (x: 10)> dask.array<shape=(10,), dtype=float64, chunksize=(10,)> Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 8 9

In [38]: test.values = 0 * test.values

In [39]: test.values Out[39]: array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Couldn't change values for on-disk datasets opened by open_mfdataset() (xarray > 0.8.2) 285294506

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