home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 438590881 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 1
  • ahmedshaaban1 1
  • TomNicholas 1

author_association 2

  • MEMBER 2
  • NONE 1

issue 1

  • MergeError: coordinate mytime1 shares a name with a dataset dimension …. This is disallowed by the xarray data model. · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
489656701 https://github.com/pydata/xarray/issues/2931#issuecomment-489656701 https://api.github.com/repos/pydata/xarray/issues/2931 MDEyOklzc3VlQ29tbWVudDQ4OTY1NjcwMQ== shoyer 1217238 2019-05-06T15:10:18Z 2019-05-06T15:10:18Z MEMBER

Yes, we'd like to remove this "feature" -- see https://github.com/pydata/xarray/issues/2368 for more discussion

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  MergeError: coordinate mytime1 shares a name with a dataset dimension …. This is disallowed by the xarray data model. 438590881
488050014 https://github.com/pydata/xarray/issues/2931#issuecomment-488050014 https://api.github.com/repos/pydata/xarray/issues/2931 MDEyOklzc3VlQ29tbWVudDQ4ODA1MDAxNA== ahmedshaaban1 15742456 2019-04-30T17:51:47Z 2019-04-30T17:51:47Z NONE

Thanks ... in case I used delattr to delete the name so that I can avoid the error message, then what is the difference between specifing or ignoring the dimnsion that the coordinate is attached. coords={ 'mytime1':(('mytime1'), tt1), } and coords={ 'mytime1': tt1, }

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  MergeError: coordinate mytime1 shares a name with a dataset dimension …. This is disallowed by the xarray data model. 438590881
487999904 https://github.com/pydata/xarray/issues/2931#issuecomment-487999904 https://api.github.com/repos/pydata/xarray/issues/2931 MDEyOklzc3VlQ29tbWVudDQ4Nzk5OTkwNA== TomNicholas 35968931 2019-04-30T15:32:18Z 2019-04-30T15:32:18Z MEMBER

So in xarray coordinates which have the same name as dimensions are given special status - they are known as "dimension coordinates". (Yes this is confusing and I think there are plans to make this structure clearer in the future.)

Dimension coordinates have to be 1D along the corresponding dimension, as indicated by the error message. However in your example you didn't specify the dimension which you want the coordinate tt1 to have, because you didn't put it in a tuple with the desired dimensions like you did with the variable var1. If you add the desired dimension in then the error is no longer thrown, and I think gives you the dataset you want:

```python import xarray as xr import pandas as p import numpy as np

var1 = np.ones((364)) tt1=p.date_range('1/1/2018','12/30/2018') tt1.name= 'time1_name'

var=xr.Dataset( data_vars={ 'var1':(('mytime1'),var1), }, coords={ 'mytime1':(('mytime1'), tt1), } ) ``` which when printed gives

<xarray.Dataset> Dimensions: (mytime1: 364) Coordinates: * mytime1 (mytime1) datetime64[ns] 2018-01-01 2018-01-02 ... 2018-12-30 Data variables: var1 (mytime1) float64 1.0 1.0 1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0 1.0

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  MergeError: coordinate mytime1 shares a name with a dataset dimension …. This is disallowed by the xarray data model. 438590881

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