home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 565718679

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/3614#issuecomment-565718679 https://api.github.com/repos/pydata/xarray/issues/3614 565718679 MDEyOklzc3VlQ29tbWVudDU2NTcxODY3OQ== 14808389 2019-12-14T13:45:38Z 2019-12-14T13:54:30Z MEMBER

that works for me, too. I moved the accessor code into a file, then imported it: ```python In [1]: import xarray as xr ...: import numpy as np ...: import custom_accessor

In [2]: ds = xr.Dataset( ...: {"a": (("latitude", "longitude"), np.linspace(0, 1, 5 * 10).reshape(5, 10))}, ...: coords={"latitude": np.arange(5), "longitude": np.arange(10)}, ...: )

In [3]: # ds.geo.c<TAB> ...: ds.geo.center Out[3]: (2.0, 4.5) `` It also works with the builtinstr,dtandplotDataArrayaccessors (just not if I'm trying to access theDataArrays from aDataset` as described above).

Edit: does your accessor work, i.e. does ds.geo.center return something?

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