{"database": "github", "table": "issue_comments", "rows": [["https://github.com/pydata/xarray/pull/5045#issuecomment-832854453", "https://api.github.com/repos/pydata/xarray/issues/5045", 832854453, "MDEyOklzc3VlQ29tbWVudDgzMjg1NDQ1Mw==", 17001470, "2021-05-05T16:57:06Z", "2021-05-05T16:57:06Z", "CONTRIBUTOR", "> `np.can_cast` with `casting='unsafe` can check this. It sounds like this would probably be something good to add to our checks :)\r\n\r\nI'm not sure how to use this, because `np.can_cast` with unsafe casting mostly returns True, e.g. `np.can_cast(str, float, casting=\"unsafe\")==True`. The error that is implemented in the tests would not be caught then. But I could explicitly try to cast the new values to the datatype of the original values with `.astype`. Would that be an option?\r\n", "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, 833778859]], "columns": ["html_url", "issue_url", "id", "node_id", "user", "created_at", "updated_at", "author_association", "body", "reactions", "performed_via_github_app", "issue"], "primary_keys": ["id"], "primary_key_values": ["832854453"], "units": {}, "query_ms": 0.4462930010049604}