home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 149590758

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/630#issuecomment-149590758 https://api.github.com/repos/pydata/xarray/issues/630 149590758 MDEyOklzc3VlQ29tbWVudDE0OTU5MDc1OA== 1322974 2015-10-20T14:49:55Z 2015-10-20T14:50:09Z CONTRIBUTOR

I was more expecting that if the coordinates are not already aligned, then the DataArray gets modified to point to the "larger" array (though of course there may be issues with other variables pointing to the same array, etc.).

I like the pattern

some_explicit_dict_name[some_explicit_entry_name] = tmpvar = np.array(...) <... work work work on initializing tmpvar, expecting to initialize some_explicit_dict_name[some_explicit_entry_name]>

(because the explicit name is a bit too long to work with and I make it immediately clear what tmpvar is used for), but xray's behavior makes this work (on DataArrays) only sometimes, with no warning that this could fail to update the array I care about.

Not sure what the best approach is. Perhaps

tmpvar = dataset.new_dataarray(*args_and_**kwargs_to_DataArray.__init__)

which would make sure that no one else is pointing to the internal array at that point?

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