home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where user = 222557 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 4

  • ENH: Plotting for groupby_bins 6
  • Histogram plot of DataArray can be extremely slow 1
  • DataArray.unstack taking unreasonable amounts of memory 1
  • Faster unstack 1

user 1

  • maahn · 9 ✖

author_association 1

  • NONE 9
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
428629924 https://github.com/pydata/xarray/pull/2152#issuecomment-428629924 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDQyODYyOTkyNA== maahn 222557 2018-10-10T16:00:14Z 2018-10-10T16:00:14Z NONE

great, thanks for taking care of that!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
412898610 https://github.com/pydata/xarray/pull/2364#issuecomment-412898610 https://api.github.com/repos/pydata/xarray/issues/2364 MDEyOklzc3VlQ29tbWVudDQxMjg5ODYxMA== maahn 222557 2018-08-14T14:48:33Z 2018-08-14T14:48:33Z NONE

At least on my laptop from 2015, its was longer than 1s:

[ 25.00%] ··· Running unstacking.Unstacking.time_unstack_fast  201.44ms
[ 50.00%] ··· Running unstacking.Unstacking.time_unstack_slow  5.75s
[ 75.00%] ··· Running unstacking.UnstackingDask.time_unstack_fast 1.35s
[100.00%] ··· Running unstacking.UnstackingDask.time_unstack_slow 7.39s

so I reduced the array size and now its

[ 25.00%] ··· Running unstacking.Unstacking.time_unstack_fast  26.33ms
[ 50.00%] ··· Running unstacking.Unstacking.time_unstack_slow   594.61ms
[ 75.00%] ··· Running unstacking.UnstackingDask.time_unstack_fast  190.38ms
[100.00%] ··· Running unstacking.UnstackingDask.time_unstack_slow 809.36ms
{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Faster unstack 350112372
411840526 https://github.com/pydata/xarray/pull/2152#issuecomment-411840526 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDQxMTg0MDUyNg== maahn 222557 2018-08-09T17:46:03Z 2018-08-09T17:46:03Z NONE

Sorry, for the delay, I finally merged upstream. Looks like the failed builds are unrelated to my changes, so it should be ready for merging?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
411815694 https://github.com/pydata/xarray/issues/1560#issuecomment-411815694 https://api.github.com/repos/pydata/xarray/issues/1560 MDEyOklzc3VlQ29tbWVudDQxMTgxNTY5NA== maahn 222557 2018-08-09T16:21:41Z 2018-08-09T16:21:41Z NONE

What about a quick fix with index.equals like this (without the prints of course): https://github.com/maahn/xarray/commit/cf83991a161fbd89af2029a69cb50f1e09a5ed45. For the example above

arr = xr.DataArray(np.empty([1, 8996, 9223]))
arr = arr.stack(flat_dim=['dim_1', 'dim_2'])
%time arr.unstack('flat_dim')

the modified routine takes 5.75 s in comparison to 6min 40s with xr 0.10.7 and pd 0.23.3. Not sure whether this is related to a newer version, but index.equals(full_idx) takes actually only 2e-4 s in that example. When slicing or reordering is applied to the MultiIndex

arr = xr.DataArray(np.arange(20).reshape((1, 10, 2))).stack(flat_dim=['dim_1', 'dim_2'])
arr.isel(flat_dim = [1,2]).unstack('flat_dim')

or

arr = xr.DataArray(np.arange(20).reshape((1, 10, 2))).stack(flat_dim=['dim_1', 'dim_2'])
arr[:,::-1].unstack('flat_dim')

it will fall back to the old method with reindex.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.unstack taking unreasonable amounts of memory 255989233
395802950 https://github.com/pydata/xarray/pull/2152#issuecomment-395802950 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDM5NTgwMjk1MA== maahn 222557 2018-06-08T15:46:38Z 2018-06-08T15:46:38Z NONE

Thanks for the review.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
394800550 https://github.com/pydata/xarray/pull/2152#issuecomment-394800550 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDM5NDgwMDU1MA== maahn 222557 2018-06-05T17:49:19Z 2018-06-05T17:51:53Z NONE

Good idea, it turned out the step function was quite easy to implement by using https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L1735 So now, 1D data defaults to the standard line plot, but you can use plot.step() instead. I guess changing the default plot to something more sophisticated would make the simple logic in plot() to determine the default quite complex?

See https://gist.github.com/maahn/91da0a8d299ef6567827749cbe2f1913

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
392944474 https://github.com/pydata/xarray/pull/2152#issuecomment-392944474 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDM5Mjk0NDQ3NA== maahn 222557 2018-05-29T21:04:51Z 2018-05-29T21:04:51Z NONE

Ok, I added the interval_step_plot kwarg (default True) to the 1D line plot to make a step plot with the real (i.e. not interpolated) boundaries. After that I had the feeling that it's inconsistent if line uses the real boundaries but pcolormesh doesn't. So I also patched that, but I had to disable infer_intervals for these cases. See also: https://gist.github.com/maahn/91da0a8d299ef6567827749cbe2f1913/530ed7bf77c9c3257cab46c3894c1412085a217a

Let me know what you think and I will also add some documentation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
391026312 https://github.com/pydata/xarray/pull/2152#issuecomment-391026312 https://api.github.com/repos/pydata/xarray/issues/2152 MDEyOklzc3VlQ29tbWVudDM5MTAyNjMxMg== maahn 222557 2018-05-22T15:07:48Z 2018-05-22T15:07:48Z NONE

Thanks, for the comment, but I wouldn't use center labels when using groupby_bins by default, that could be misleading in case of non-uniform (e.g. exponential) bin spacing. I guess that's acceptable for a plot, but not for a DataArray, because the information about the boundaries would be lost. And from a user perspective, I would find it a bit confusing if an additional coordinate would show up when using groupby_bins.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Plotting for groupby_bins 324105458
234008125 https://github.com/pydata/xarray/issues/908#issuecomment-234008125 https://api.github.com/repos/pydata/xarray/issues/908 MDEyOklzc3VlQ29tbWVudDIzNDAwODEyNQ== maahn 222557 2016-07-20T16:44:57Z 2016-07-20T16:44:57Z NONE

OK, I reported it to the matplotlib team: https://github.com/matplotlib/matplotlib/issues/6804

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Histogram plot of DataArray can be extremely slow 166449498

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