home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where issue = 373742432 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 5

  • jhamman 4
  • dcherian 3
  • shoyer 2
  • max-sixty 2
  • pep8speaks 1

author_association 2

  • MEMBER 11
  • NONE 1

issue 1

  • Remove .T as shortcut for transpose() · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
433265088 https://github.com/pydata/xarray/pull/2509#issuecomment-433265088 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzI2NTA4OA== jhamman 2443309 2018-10-26T02:23:56Z 2018-10-26T02:23:56Z MEMBER

Thanks @dcherian!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433233234 https://github.com/pydata/xarray/pull/2509#issuecomment-433233234 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzIzMzIzNA== max-sixty 5635139 2018-10-25T23:00:15Z 2018-10-25T23:00:15Z MEMBER

I just wanted to illustrate that these are the same problems and that only removing the property from the Dataset may lead to continued confusion.

I think that's a good point. There are a few methods on DataArrays but not Datasets, but not many:

python In [4]: {x for x in set(dir(xr.DataArray)) - set(dir(xr.Dataset)) if not x.startswith("_")} Out[4]: {'data', 'dot', 'dt', 'dtype', 'from_cdms2', 'from_iris', 'from_series', 'get_axis_num', 'item', 'name', 'ndim', 'plot', 'searchsorted', 'shape', 'size', 'to_cdms2', 'to_dataset', 'to_index', 'to_iris', 'to_masked_array', 'to_pandas', 'to_series', 'variable'}

Regardless, sounds like @shoyer thinks we should merge (and I'm probably still +0.1)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433104356 https://github.com/pydata/xarray/pull/2509#issuecomment-433104356 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzEwNDM1Ng== shoyer 1217238 2018-10-25T15:48:45Z 2018-10-25T15:48:45Z MEMBER

I suppose the case for removing DataArray.T is that you don't really need a shortcut for transposing arrays in xarray, since most functions don't rely on dimension order. And of course the real motivation: some weather/climate scientists like to use a variable named T for time :).

The counter-argument would be that T is found on most other numpy array-like types, including pandas.DataFrame. I've definitely used .T as a convenient shortcut myself in some cases.

I guess that puts me at -0 for deprecating DataArray.T. But we can merge this already, and leave that for a separate discussion.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433097976 https://github.com/pydata/xarray/pull/2509#issuecomment-433097976 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzA5Nzk3Ng== jhamman 2443309 2018-10-25T15:31:45Z 2018-10-25T15:31:45Z MEMBER

Sure, that's a good point. I just wanted to illustrate that these are the same problems and that only removing the property from the Dataset may lead to continued confusion. @shoyer thoughts?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433097642 https://github.com/pydata/xarray/pull/2509#issuecomment-433097642 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzA5NzY0Mg== max-sixty 5635139 2018-10-25T15:30:55Z 2018-10-25T15:30:55Z MEMBER

I'm +0.2 for merging this, but at least issuing a DeprecationWarning before removing from DataArray.T (with no strong view on whether we do remove it)

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433095855 https://github.com/pydata/xarray/pull/2509#issuecomment-433095855 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzA5NTg1NQ== dcherian 2448579 2018-10-25T15:26:34Z 2018-10-25T15:26:34Z MEMBER

@jhamman one hiccup is that we haven't been issuing a DeprecationWarning for DataArray.T

I'm OK with removing it though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433076200 https://github.com/pydata/xarray/pull/2509#issuecomment-433076200 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzA3NjIwMA== jhamman 2443309 2018-10-25T14:36:09Z 2018-10-25T14:36:09Z MEMBER

Feeling like playing devils advocate here. I would expect we'll run into similar confusion with the DataArray transpose property.

```Python

da = xr.DataArray([1, 2, 3, 4], dims=('time', ), coords={'time': pd.date_range('2018-10-24', periods=4)}) da.time

<xarray.DataArray 'time' (time: 4)> array(['2018-10-24T00:00:00.000000000', '2018-10-25T00:00:00.000000000', '2018-10-26T00:00:00.000000000', '2018-10-27T00:00:00.000000000'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2018-10-24 2018-10-25 2018-10-26 2018-10-27

da = xr.DataArray([1, 2, 3, 4], dims=('T', ), coords={'T': pd.date_range('2018-10-24', periods=4)}) da.T

<xarray.DataArray (T: 4)> array([1, 2, 3, 4]) Coordinates: * T (T) datetime64[ns] 2018-10-24 2018-10-25 2018-10-26 2018-10-27 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
433025675 https://github.com/pydata/xarray/pull/2509#issuecomment-433025675 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMzAyNTY3NQ== dcherian 2448579 2018-10-25T12:09:52Z 2018-10-25T12:09:52Z MEMBER

I think this is arguably still useful/expected since DataArray is modeled on a NumPy array.

I agree

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
432922767 https://github.com/pydata/xarray/pull/2509#issuecomment-432922767 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMjkyMjc2Nw== shoyer 1217238 2018-10-25T05:48:24Z 2018-10-25T05:48:24Z MEMBER

For posterity, what did we decide to do with the DataArray.T property?

I think this is arguably still useful/expected since DataArray is modeled on a NumPy array. But I could probably be convinced otherwise...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
432916503 https://github.com/pydata/xarray/pull/2509#issuecomment-432916503 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMjkxNjUwMw== dcherian 2448579 2018-10-25T05:09:32Z 2018-10-25T05:09:32Z MEMBER

For posterity, what did we decide to do with the DataArray.T property?

I'm not sure but I've fixed the whats-new entry to say that only Dataset.T has been removed currently.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
432895010 https://github.com/pydata/xarray/pull/2509#issuecomment-432895010 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMjg5NTAxMA== jhamman 2443309 2018-10-25T02:45:59Z 2018-10-25T02:45:59Z MEMBER

For posterity, what did we decide to do with the DataArray.T property?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432
432886759 https://github.com/pydata/xarray/pull/2509#issuecomment-432886759 https://api.github.com/repos/pydata/xarray/issues/2509 MDEyOklzc3VlQ29tbWVudDQzMjg4Njc1OQ== pep8speaks 24736507 2018-10-25T01:58:11Z 2018-10-25T01:58:11Z NONE

Hello @dcherian! Thanks for submitting the PR.

  • There are no PEP8 issues in the file xarray/core/dataset.py !

  • There are no PEP8 issues in the file xarray/tests/test_dataset.py !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove .T as shortcut for transpose() 373742432

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