home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 274996832

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
274996832 MDU6SXNzdWUyNzQ5OTY4MzI= 1726 Behavior of dataarray with no dimensions 3621629 closed 0     3 2017-11-17T21:07:55Z 2018-01-11T21:24:43Z 2018-01-11T21:24:43Z CONTRIBUTOR      

Consider

```python type(np.array([1.0]).mean())

-> numpy.float64

type(pd.Series([1.0]).mean())

-> float

type(xr.DataArray([1.0]).mean())

-> xarray.core.dataarray.DataArray

```

The issue is that this dimensionless data array won't be cast into float by numpy/pandas when constructing a new ndarray/dataframe. You'll have to do it explicitly. Not a big deal but it feels weird.

I'm sure there's a real technical reason (keeping metadata ?) behind this behavior but I couldn't find any discussion about it.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1726/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 158.429ms · About: xarray-datasette