issues: 296673404
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
296673404 | MDU6SXNzdWUyOTY2NzM0MDQ= | 1906 | Coordinate attributes as DataArray type doesn't export to netcdf | 167802 | closed | 0 | 5 | 2018-02-13T09:48:53Z | 2018-02-26T09:34:24Z | 2018-02-26T09:34:24Z | CONTRIBUTOR | Code Sample, a copy-pastable example if possible```python import numpy as np import xarray as xr arr = xr.DataArray([[1, 2, 3]], dims=['time', 'x']) arr['time'] = np.array([1]) time_bnds = xr.DataArray([0, 1], dims='time_bounds') arr['time'].attrs['bounds'] = time_bnds dataset = xr.Dataset({'arr': arr, 'time_bnds': time_bnds}) dataset.to_netcdf('time_bnd.nc') ``` Problem descriptionThis code produces a TypeError
Expected outputI would expect an output like this (ncdump -h):
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1906/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |