home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 389885258

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/issues/2149#issuecomment-389885258 https://api.github.com/repos/pydata/xarray/issues/2149 389885258 MDEyOklzc3VlQ29tbWVudDM4OTg4NTI1OA== 6213168 2018-05-17T14:25:24Z 2018-05-17T14:25:24Z MEMBER
  1. this is limited to dtype=S1. There's auto tests implemented for dtype=f4 and dtype=int16 (https://github.com/pydata/xarray/blob/master/xarray/tests/test_backends.py#L729-L756), and those work fine. ds = xarray.Dataset({'x': [1, 2]}) ds.to_netcdf('test.nc', encoding={'x': {'dtype': 'f4'}})
  2. the bug can be worked around by setting the dtype on the variable directly - for which there is an automated test specific for S1 (https://github.com/pydata/xarray/blob/master/xarray/tests/test_backends.py#L333-L343): ds = xarray.Dataset({'x': ['foo', 'bar', 'baz']}) ds['x'].encoding['dtype'] = 'S1' ds.to_netcdf('test.nc')
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  324040111
Powered by Datasette · Queries took 75.425ms · About: xarray-datasette