home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 192114256

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/706#issuecomment-192114256 https://api.github.com/repos/pydata/xarray/issues/706 192114256 MDEyOklzc3VlQ29tbWVudDE5MjExNDI1Ng== 1217238 2016-03-04T05:39:43Z 2016-03-04T05:39:43Z MEMBER

This would already be quite cool! But would the mechanism allow to pass arguments to the MyLibGis class at construction time? This might also be wordy, maybe something like ds = xray.DataArray(data, gis={'arg1':42})?

My suggested approach here would be to simply write functions instead, e.g.,

def make_gis_array(data, gis=None): data = xr.DataArray(data) data.attrs['gis'] = gis # or whatever

This is similar to how I would suggest inserting lazy variables, i.e., write your own functions using dask.array:

def add_lazy_vars(data): if 'P' in data and 'PB' in data: data['TP'] = data['P'].chunk() + data['PB'].chunk() return data

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