home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

21 rows where issue = 145243134 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 4

  • pwolfram 10
  • shoyer 6
  • max-sixty 3
  • fmaussion 2

author_association 2

  • MEMBER 11
  • CONTRIBUTOR 10

issue 1

  • Add drop=True option for where on Dataset and DataArray · 21 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
207892482 https://github.com/pydata/xarray/pull/815#issuecomment-207892482 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNzg5MjQ4Mg== pwolfram 4295853 2016-04-10T00:55:47Z 2016-04-10T00:55:47Z CONTRIBUTOR

My pleasure, thank you @shoyer for all the really great help designing the code and making it much better!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
207890803 https://github.com/pydata/xarray/pull/815#issuecomment-207890803 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNzg5MDgwMw== shoyer 1217238 2016-04-10T00:33:25Z 2016-04-10T00:33:25Z MEMBER

Thanks @pwolfram !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
207123411 https://github.com/pydata/xarray/pull/815#issuecomment-207123411 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNzEyMzQxMQ== pwolfram 4295853 2016-04-07T22:43:24Z 2016-04-07T22:43:24Z CONTRIBUTOR

Thanks @MaximilianR and @shoyer! I think we are at the last call before the merge now.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
205473912 https://github.com/pydata/xarray/pull/815#issuecomment-205473912 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNTQ3MzkxMg== pwolfram 4295853 2016-04-04T20:09:10Z 2016-04-04T20:09:10Z CONTRIBUTOR

@shoyer, I believe I have addressed your comments and this should be ready to merge. Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
205406043 https://github.com/pydata/xarray/pull/815#issuecomment-205406043 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNTQwNjA0Mw== shoyer 1217238 2016-04-04T17:28:12Z 2016-04-04T17:28:12Z MEMBER

looks good to me other than a few nits

Please also add a release note crediting yourself!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204526977 https://github.com/pydata/xarray/pull/815#issuecomment-204526977 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUyNjk3Nw== pwolfram 4295853 2016-04-01T19:08:19Z 2016-04-02T01:50:03Z CONTRIBUTOR

@shoyer, user documentation added in 96677b5846603fcd3aa5fe11e56a65482a46f856

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204574264 https://github.com/pydata/xarray/pull/815#issuecomment-204574264 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDU3NDI2NA== pwolfram 4295853 2016-04-01T21:39:13Z 2016-04-01T21:39:50Z CONTRIBUTOR

@shoyer, @MaximilianR, and @fmaussion this is done and I added a few more test cases with nonuniform coordinates to hopefully ensure there aren't any hidden bugs.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204564456 https://github.com/pydata/xarray/pull/815#issuecomment-204564456 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDU2NDQ1Ng== shoyer 1217238 2016-04-01T21:00:31Z 2016-04-01T21:00:31Z MEMBER

+1 for drop=True

On Fri, Apr 1, 2016 at 1:59 PM, Phillip Wolfram notifications@github.com wrote:

@shoyer https://github.com/shoyer et al, I think @MaximilianR https://github.com/MaximilianR's suggestion makes sense. This would reduce the amount of code that has to be accounted for too and would be cleaner. Essentially have this method be called via array.where(mask, drop=True) instead of array.sel_where(mask).

All feedback on this proposal welcome.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/pydata/xarray/pull/815#issuecomment-204564228

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204564228 https://github.com/pydata/xarray/pull/815#issuecomment-204564228 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDU2NDIyOA== pwolfram 4295853 2016-04-01T20:59:22Z 2016-04-01T20:59:22Z CONTRIBUTOR

@shoyer et al, I think @MaximilianR's suggestion makes sense. This would reduce the amount of code that has to be accounted for too and would be cleaner. Essentially have this method be called via array.where(mask, drop=True) instead of array.sel_where(mask).

All feedback on this proposal welcome.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204561434 https://github.com/pydata/xarray/pull/815#issuecomment-204561434 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDU2MTQzNA== max-sixty 5635139 2016-04-01T20:46:56Z 2016-04-01T20:47:21Z MEMBER

FWIW I'm not a fan of the sel_where name, sel is otherwise associated with labels, and this takes bools. Have you thought about including this in where, with a kwarg such as drop?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204561404 https://github.com/pydata/xarray/pull/815#issuecomment-204561404 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDU2MTQwNA== max-sixty 5635139 2016-04-01T20:46:49Z 2016-04-01T20:46:49Z MEMBER

Right, I see. I think it's equivalent only to a pandas slice on Series, rather than a DataFrame.

``` python In [71]: series = pd.Series(range(10))

In [72]: series[series>5] Out[72]: 6 6 7 7 8 8 9 9 dtype: int64

...same as sel_where

In [78]: df =pd.DataFrame(pd.np.arange(40).reshape(4,10))

In [79]: df[(df>11) & (df < 28)] Out[79]: 0 1 2 3 4 5 6 7 8 9 0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 1 NaN NaN 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 NaN NaN 3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN

...same as where

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204530971 https://github.com/pydata/xarray/pull/815#issuecomment-204530971 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUzMDk3MQ== pwolfram 4295853 2016-04-01T19:19:35Z 2016-04-01T19:19:35Z CONTRIBUTOR

@shoyer, squashed the commits for simplicity.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204527062 https://github.com/pydata/xarray/pull/815#issuecomment-204527062 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUyNzA2Mg== shoyer 1217238 2016-04-01T19:08:46Z 2016-04-01T19:10:15Z MEMBER

@MaximilianR In this example I used where to produce a map:

```

ds.states.where(ds.states == state_ids['California']).plot() ```

If I used sel_where, the plot would be automatically trimmed. That's the main usecase here. I don't think there is an equivalent shortcut in pandas.

@fmaussion that's correct that you cannot do lazy computation with the result of nonzero on a dask array. However, computing nonzero itself could be an expensive operation if the mask is large, and we could do that with dask.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204525952 https://github.com/pydata/xarray/pull/815#issuecomment-204525952 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUyNTk1Mg== fmaussion 10050469 2016-04-01T19:03:47Z 2016-04-01T19:03:47Z MEMBER

@pwolfram thanks. It's hard to tell form the print, but from the dimensions of the output it looks fine. The real use case would if you have (x,y,time), you would like to sel_where based on x,y only (for example a landmask or something).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204525759 https://github.com/pydata/xarray/pull/815#issuecomment-204525759 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUyNTc1OQ== max-sixty 5635139 2016-04-01T19:02:55Z 2016-04-01T19:02:55Z MEMBER

Forgive me if this is naive - is this equivalent to a pandas slice?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204523177 https://github.com/pydata/xarray/pull/815#issuecomment-204523177 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUyMzE3Nw== pwolfram 4295853 2016-04-01T18:58:45Z 2016-04-01T18:58:45Z CONTRIBUTOR

@shoyer, thanks for submitting the dask issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204519675 https://github.com/pydata/xarray/pull/815#issuecomment-204519675 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUxOTY3NQ== shoyer 1217238 2016-04-01T18:50:41Z 2016-04-01T18:50:57Z MEMBER

At some point it might be useful to be able to use dask to compute the mask (with mask.data.nonzero()), so I made an issue for that: https://github.com/dask/dask/issues/1076

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204513246 https://github.com/pydata/xarray/pull/815#issuecomment-204513246 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUxMzI0Ng== pwolfram 4295853 2016-04-01T18:44:27Z 2016-04-01T18:44:27Z CONTRIBUTOR

@fmaussion, for

python array = DataArray(np.arange(5**3).reshape(5, 5, 5), dims=('x', 'y', 'z')) mask = DataArray(np.arange(5**2).reshape(5, 5), dims=('x', 'y')) actual = array.sel_where(np.logical_and(mask > 6, mask < 18))

it returns this

``` python (Pdb) actual <xarray.DataArray (x: 3, y: 5, z: 5)> array([[[ nan, nan, nan, nan, nan], [ nan, nan, nan, nan, nan], [ 35., 36., 37., 38., 39.], [ 40., 41., 42., 43., 44.], [ 45., 46., 47., 48., 49.]],

   [[ 50.,  51.,  52.,  53.,  54.],
    [ 55.,  56.,  57.,  58.,  59.],
    [ 60.,  61.,  62.,  63.,  64.],
    [ 65.,  66.,  67.,  68.,  69.],
    [ 70.,  71.,  72.,  73.,  74.]],

   [[ 75.,  76.,  77.,  78.,  79.],
    [ 80.,  81.,  82.,  83.,  84.],
    [ 85.,  86.,  87.,  88.,  89.],
    [ nan,  nan,  nan,  nan,  nan],
    [ nan,  nan,  nan,  nan,  nan]]])

Coordinates: * x (x) int64 1 2 3 * y (y) int64 0 1 2 3 4 * z (z) int64 0 1 2 3 4 ```

where

``` python (Pdb) array <xarray.DataArray (x: 5, y: 5, z: 5)> array([[[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [ 10, 11, 12, 13, 14], [ 15, 16, 17, 18, 19], [ 20, 21, 22, 23, 24]],

   [[ 25,  26,  27,  28,  29],
    [ 30,  31,  32,  33,  34],
    [ 35,  36,  37,  38,  39],
    [ 40,  41,  42,  43,  44],
    [ 45,  46,  47,  48,  49]],

   [[ 50,  51,  52,  53,  54],
    [ 55,  56,  57,  58,  59],
    [ 60,  61,  62,  63,  64],
    [ 65,  66,  67,  68,  69],
    [ 70,  71,  72,  73,  74]],

   [[ 75,  76,  77,  78,  79],
    [ 80,  81,  82,  83,  84],
    [ 85,  86,  87,  88,  89],
    [ 90,  91,  92,  93,  94],
    [ 95,  96,  97,  98,  99]],

   [[100, 101, 102, 103, 104],
    [105, 106, 107, 108, 109],
    [110, 111, 112, 113, 114],
    [115, 116, 117, 118, 119],
    [120, 121, 122, 123, 124]]])

Coordinates: * x (x) int64 0 1 2 3 4 * y (y) int64 0 1 2 3 4 * z (z) int64 0 1 2 3 4 ```

python (Pdb) np.logical_and(mask > 6, mask < 18) <xarray.DataArray (x: 5, y: 5)> array([[False, False, False, False, False], [False, False, True, True, True], [ True, True, True, True, True], [ True, True, True, False, False], [False, False, False, False, False]], dtype=bool) Coordinates: * x (x) int64 0 1 2 3 4 * y (y) int64 0 1 2 3 4

Is this what you were expecting?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204501428 https://github.com/pydata/xarray/pull/815#issuecomment-204501428 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDUwMTQyOA== fmaussion 10050469 2016-04-01T18:21:04Z 2016-04-01T18:21:04Z MEMBER

This is very cool! Would it also work in that case?

python a = xr.DataArray(np.arange(5**3).reshape(5, 5, 5), dims=('x', 'y', 'z')) mask = xr.DataArray(np.arange(5**2).reshape(5, 5), dims=('x', 'y')) a.sel_where(np.logical_and(mask > 6, mask < 18))

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204499751 https://github.com/pydata/xarray/pull/815#issuecomment-204499751 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDQ5OTc1MQ== shoyer 1217238 2016-04-01T18:14:42Z 2016-04-01T18:14:42Z MEMBER

Yes, expanding the section on "where" seems like the right place to put this.

On Fri, Apr 1, 2016 at 11:08 AM, Phillip Wolfram notifications@github.com wrote:

@shoyer https://github.com/shoyer, I haven't added any specific documentation. Would you recommend doing so and if so, should this go near here https://github.com/pydata/xarray/blame/master/doc/indexing.rst#L265?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/pydata/xarray/pull/815#issuecomment-204498369

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134
204498369 https://github.com/pydata/xarray/pull/815#issuecomment-204498369 https://api.github.com/repos/pydata/xarray/issues/815 MDEyOklzc3VlQ29tbWVudDIwNDQ5ODM2OQ== pwolfram 4295853 2016-04-01T18:08:46Z 2016-04-01T18:08:59Z CONTRIBUTOR

@shoyer, I haven't added any specific documentation to the user guide. Would you recommend doing so and if so, should this go near here https://github.com/pydata/xarray/blame/master/doc/indexing.rst#L265?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add drop=True option for where on Dataset and DataArray 145243134

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