issues: 429572364
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
429572364 | MDU6SXNzdWU0Mjk1NzIzNjQ= | 2868 | netCDF4: support for structured arrays as attribute values; serialize as "compound types" | 167164 | open | 0 | 3 | 2019-04-05T03:54:17Z | 2022-04-07T15:23:25Z | NONE | Code Sample, a copy-pastable example if possibleA "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you: http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports ```python ds.attrs = dict(a=dict(b=2)) ds.to_netcdf(outfile) ... ~/miniconda3/envs/ana/lib/python3.6/site-packages/xarray/backends/api.py in check_attr(name, value) 158 'a string, an ndarray or a list/tuple of ' 159 'numbers/strings for serialization to netCDF ' --> 160 'files'.format(value)) 161 162 # Check attrs on the dataset itself TypeError: Invalid value for attr: {'b': 2} must be a number, a string, an ndarray or a list/tuple of numbers/strings for serialization to netCDF files ``` Problem descriptionI'm not entirely sure if this should be possible, but it seems like it should be from this email: https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg10502.html Nested attributes would be nice as a way to namespace metadata. Expected OutputNetcdf with nested global attributes. Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2868/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |