home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 156581823

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/656#issuecomment-156581823 https://api.github.com/repos/pydata/xarray/issues/656 156581823 MDEyOklzc3VlQ29tbWVudDE1NjU4MTgyMw== 109530 2015-11-13T22:54:21Z 2015-11-13T22:54:21Z NONE

For the sake of cut & paste:

python ds = xray.Dataset( {'my_ones': (('dim1',), np.ones((100)))}, {'dim1':np.arange(0,100)}) ds ds['new_var'] = np.random.rand(100) / ds.my_ones ds ds.my_ones = np.random.rand(100) ds ds.attrs['my_ones'] = ds.my_ones ds

below will initially fail because ds.my_ones is just an array and has no attribute values:

python ds.my_ones.values = ds.my_ones del ds.my_ones ds ds.my_ones.values = ds.attrs['my_ones']

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  116869436
Powered by Datasette · Queries took 0.811ms · About: xarray-datasette