home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 111795064

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
111795064 MDU6SXNzdWUxMTE3OTUwNjQ= 627 string coordinate gets converted to object coordinate upon addition of variable to dataset 1322974 closed 0     10 2015-10-16T09:29:58Z 2021-03-27T21:19:33Z 2021-03-27T21:19:33Z CONTRIBUTOR      

With the current HEAD, consider

``` import numpy as np from xray import *

ds = Dataset({"1": DataArray(np.zeros(3), dims=["a"], coords={"a": list("xyz")})}) print(ds) ds["2"] = DataArray(np.zeros(2), dims=["a"], coords={"a": list("xy")}) print(ds) ```

This outputs

<xray.Dataset> Dimensions: (a: 3) Coordinates: * a (a) <U1 'x' 'y' 'z' Data variables: 1 (a) float64 0.0 0.0 0.0 <xray.Dataset> Dimensions: (a: 3) Coordinates: * a (a) object 'x' 'y' 'z' Data variables: 1 (a) float64 0.0 0.0 0.0 2 (a) float64 0.0 0.0 nan

Note that the dtype of the a coordinate got changed after the assignment.

Python3.5, numpy 1.10.1, xray master (6ea7eb2b388075cc838c5ddf0ddaa47020cfcb89)

With 0.6.0 the coordinate is of object dtype both before and after. I forgot why I tried master but I must have had a good reason...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/627/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
  • 10 rows from issue in issue_comments
Powered by Datasette · Queries took 0.78ms · About: xarray-datasette