home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 242789058

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/987#issuecomment-242789058 https://api.github.com/repos/pydata/xarray/issues/987 242789058 MDEyOklzc3VlQ29tbWVudDI0Mjc4OTA1OA== 1217238 2016-08-26T16:51:02Z 2016-08-26T16:52:17Z MEMBER

I agree that this can be annoying. The downside in making this switch is that we would lose xarray specific fields like coords and attrs that are currently preserved, e.g.,

```

array = xr.DataArray([1, 2, 3], coords=[('x', ['a', 'b', 'c'])]) array <xarray.DataArray (x: 3)> array([1, 2, 3]) Coordinates: * x (x) |S1 'a' 'b' 'c' array[0] <xarray.DataArray ()> array(1) Coordinates: x |S1 'a' array[0].coords['x'].item() 'a' ```

Also, strictly from a simplicity point of view for xarray, it's nice for every function to return fixed types.

NumPy solved this problem by creating it's own scalar types (e.g., np.float64) that define fields like shape and dtype while also subclassing Python's builtin numeric types. We could do the same, but this could lead to a different set of subtle cross-compatibility issues.

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