home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 336485515

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/1628#issuecomment-336485515 https://api.github.com/repos/pydata/xarray/issues/1628 336485515 MDEyOklzc3VlQ29tbWVudDMzNjQ4NTUxNQ== 6815844 2017-10-13T15:27:04Z 2017-10-13T15:27:04Z MEMBER

I am trying to implement this inside AttrAccessMixin class. I am wondering if the following is a designed behavior.

```python In [1]: import xarray as xr ...: da = xr.DataArray([0, 1, 2], dims=['x'], attrs={'foo': 'brabra'}) ...: da ...: Out[1]: <xarray.DataArray (x: 3)> array([0, 1, 2]) Dimensions without coordinates: x Attributes: foo: brabra

In [2]: da.foo Out[2]: 'brabra' ```

An attribute foo can be accessed only by attribute-style, but not __getitem__ style, da[foo].

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