home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 945016426

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/5847#issuecomment-945016426 https://api.github.com/repos/pydata/xarray/issues/5847 945016426 IC_kwDOAMm_X844U85q 14371165 2021-10-16T22:37:44Z 2021-10-16T22:37:44Z MEMBER

That's rather annoying that the pint units are dropped: python arr = xr.DataArray( name="var_a", data=np.array([[1, 2], [3, 4]]), # TODO make coord a Quantity once unit-aware indexes supported coords=dict( a=("a", pint.Quantity(np.array([5, 6]), "s")), b=("b", np.array([7, 8]), {"unit": "s"}), ), dims=("a", "b"), ) C:\Users\J.W\Documents\GitHub\xarray\xarray\core\utils.py:118: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. index = pd.Index(np.asarray(array), **kwargs) I think xarray could've at least moved the pint unit string to arr.a.attrs["units"] before downcasting it to ndarrays.

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