home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 552049679

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/pull/3502#issuecomment-552049679 https://api.github.com/repos/pydata/xarray/issues/3502 552049679 MDEyOklzc3VlQ29tbWVudDU1MjA0OTY3OQ== 13301940 2019-11-09T01:13:22Z 2019-11-09T01:21:27Z MEMBER

@dcherian, what is the right way to do the type casting in encode()?

I thought of trying something along these lines:

python encoding["missing_value"] = encoding["missing_value"].astype(data.dtype) However, I quickly realized that this breaks when encoding["missing_value"] is not a numpy object.

EDIT:

I will try using np.asarray():

python encoding["missing_value"] = np.asarray(encoding["missing_value"]).astype(data.dtype)

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