home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 315149637 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • ebo 2
  • fujiisoup 2
  • rabernat 1

author_association 2

  • MEMBER 3
  • NONE 2

issue 1

  • how do you flatten an xarray? · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
390096741 https://github.com/pydata/xarray/issues/2065#issuecomment-390096741 https://api.github.com/repos/pydata/xarray/issues/2065 MDEyOklzc3VlQ29tbWVudDM5MDA5Njc0MQ== fujiisoup 6815844 2018-05-18T05:14:31Z 2018-05-18T05:14:31Z MEMBER

Closing. Please feel free to reopen this if you have an API suggestion.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  how do you flatten an xarray? 315149637
383359925 https://github.com/pydata/xarray/issues/2065#issuecomment-383359925 https://api.github.com/repos/pydata/xarray/issues/2065 MDEyOklzc3VlQ29tbWVudDM4MzM1OTkyNQ== ebo 601025 2018-04-22T06:54:10Z 2018-04-22T06:54:10Z NONE

On Apr 21 2018 10:17 PM, Keisuke Fujii wrote:

How about reset_index? python array.stack(z=('x', 'y')).reset_index('z')

Before I left work for the weekend I had tried array.stack(z=('x', 'y')), but I had not come across reset_index yet. I will give that a try ASAP.

EBo --

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  how do you flatten an xarray? 315149637
383354247 https://github.com/pydata/xarray/issues/2065#issuecomment-383354247 https://api.github.com/repos/pydata/xarray/issues/2065 MDEyOklzc3VlQ29tbWVudDM4MzM1NDI0Nw== fujiisoup 6815844 2018-04-22T04:17:50Z 2018-04-22T04:17:50Z MEMBER

How about reset_index? python array.stack(z=('x', 'y')).reset_index('z')

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  how do you flatten an xarray? 315149637
382082786 https://github.com/pydata/xarray/issues/2065#issuecomment-382082786 https://api.github.com/repos/pydata/xarray/issues/2065 MDEyOklzc3VlQ29tbWVudDM4MjA4Mjc4Ng== ebo 601025 2018-04-17T17:49:54Z 2018-04-17T17:49:54Z NONE

Thank you rabernat . I just tried:

``` array.stack(z=('x', 'y')) X

<xarray.DataArray (band: 3, z: 1647861)> dask.array<shape=(3, 1647861), dtype=float64, chunksize=(1, 1647861)> Coordinates: * band (band) int64 1 2 3 * z (z) MultiIndex - x (z) float64 1.939e+05 1.939e+05 1.939e+05 1.939e+05 1.939e+05 ... - y (z) float64 4.986e+06 4.985e+06 4.985e+06 4.984e+06 4.984e+06 ... nX = client.compute(X) ``` and got the following error:

/home/jldavid3/anaconda3/envs/pangeo/lib/python3.6/site-packages/distributed/worker.py:741: UserWarning: Large object of size 6.61 MB detected in task graph: ([[["('reshape-33c73e5277bff381fea27bc752d60c16', ... e, None), None) Consider scattering large objects ahead of time with client.scatter to reduce scheduler burden and keep data on workers

future = client.submit(func, big_data)    # bad

big_future = client.scatter(big_data)     # good
future = client.submit(func, big_future)  # good

% (format_bytes(len(b)), s)) distributed.worker - WARNING - Compute Failed Function: _dask_finalize args: ([[[array([[ 1.11333953, 0.15302669, 2.30724196, ..., -0.49583333, -0.31415252, 0.17898109]])], [array([[ 0.2049355 , 1.32097473, -1.11873895, ..., -0.10651731, 0.69806911, 1.34692913]])], [array([[ 0.59425151, -0.52178773, 0.80188672, ..., -0.83324054, -0.54774213, -0.15842612]])]]], <function Dataset._dask_postcompute at 0x7fbaded21158>, ([(False, 'band', <xarray.IndexVariable 'band' (band: 3)> array([1, 2, 3])), (False, 'z', <xarray.IndexVariable 'z' (z: 1647861)> array([(193899.75, 4985847.0), (193899.75, 4985391.0), (193899.75, 4984935.0), ..., (805851.75, 4427703.0), (805851.75, 4427247.0), (805851.75, 4426791.0)], dtype=object)), (True, <this-array>, (<function Variable._dask_finalize at 0x7fbadee159d8>, (<function finalize at 0x7fbaf986e8c8>, (), ('band', 'z'), OrderedDict(), None)))], {'z', 'band'}, {'band': 3, 'z': 1647861}, None, None, None), None) kwargs: {} Exception: KeyError(<this-array>,)

distributed.scheduler - ERROR - error from worker inproc://169.154.136.32/2193/2: <this-array>

Do you have any suggestions? I will read up more on stack later to see what else I can learn, but do you have any suggestions? I figure I probably am missing an argument or got something out of order.

Thanks again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  how do you flatten an xarray? 315149637
382072585 https://github.com/pydata/xarray/issues/2065#issuecomment-382072585 https://api.github.com/repos/pydata/xarray/issues/2065 MDEyOklzc3VlQ29tbWVudDM4MjA3MjU4NQ== rabernat 1197350 2018-04-17T17:17:00Z 2018-04-17T17:17:00Z MEMBER

I think you are looking for stack:

http://xarray.pydata.org/en/stable/reshaping.html#stack-and-unstack

On Tue, Apr 17, 2018 at 1:01 PM, John (EBo) David notifications@github.com wrote:

I got a version of TomAugspurger's Spectral Clustering modified to work with GeoTIFFs http://localhost:8839/notebooks/geo-spectral- geotiff-da.ipynb, and I have been working to modify it to run using xarrays http://localhost:8839/notebooks/geo-spectral-geotiff-xa.ipynb.

I'm currently stuck on getting the xarray flattened/reduced. I keep getting errors similar to: "TypeError: 'axis' is an invalid keyword argument for this function" no matter what I have tried. I need to find some way to change the array into nbands x (1 x N). I have not been able to figure out how to do this via the examples or docs I've read.

Suggestions? Also if you have other suggestions on how to clean up either example let me know.

Also, these are using publicly available data and will be free to post some place if desired.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/issues/2065, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFJsmXNCEBNikb-Ms9Z-iVk9P4V1jqks5tph_wgaJpZM4TYsde .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  how do you flatten an xarray? 315149637

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 88.028ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows