home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 152265953

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-152265953 https://api.github.com/repos/pydata/xarray/issues/630 152265953 MDEyOklzc3VlQ29tbWVudDE1MjI2NTk1Mw== 1217238 2015-10-29T17:56:32Z 2015-10-29T17:56:32Z MEMBER

If it is the latter, one can just modify d.values and e.values (as well as their coordinates systems) to point to the new ndarrays, right?

Yes, in principle we could do that. But it's very surprising for a function to modify it's input arguments, so usually we try to avoid things like that.

If you put arrays in a Dataset, you should not count on modifications to the arrays in the Dataset trickling back to the original arrays.

Generally, I would recommend something like the following:

d = DataArray(...) e = DataArray(...) d, e = xray.align(d, e, join='outer') <work to initialize d and e> ds = Dataset({"d": d, "e": e})

or

d = DataArray(...) e = DataArray(...) ds = Dataset({"d": d, "e": e}) <work to initialize ds.d and ds.e>

{
    "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 396.137ms · About: xarray-datasette