home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 385830499

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/2097#issuecomment-385830499 https://api.github.com/repos/pydata/xarray/issues/2097 385830499 MDEyOklzc3VlQ29tbWVudDM4NTgzMDQ5OQ== 6815844 2018-05-02T00:33:17Z 2018-05-02T00:33:17Z MEMBER

Thanks for the report.

We did not consider to store an object type array other than string, but it should be supported.

I think we should improve this line, https://github.com/pydata/xarray/blob/39b2a37207fc8e6c5199ba9386831ba7eb06d82b/xarray/core/variable.py#L171-L172

We internally use many inhouse array-like classes and this line is used to avoid multiple nesting. I think we can change this line to more explicit type checking.

Currently, the following does not work either python In [11]: xr.DataArray(HasValues, dims=[]) Out[11]: <xarray.DataArray ()> array(5)

For your perticular purpose, the following will be working bad_indexed.loc[{'dim_0': 0}] = np.array(HasValues(), dtype=object)

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