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/4471#issuecomment-703435472,https://api.github.com/repos/pydata/xarray/issues/4471,703435472,MDEyOklzc3VlQ29tbWVudDcwMzQzNTQ3Mg==,1217238,2020-10-05T06:49:52Z,2020-10-05T06:49:52Z,MEMBER,"I agree, xarray's decoding should be robust as to whether these attributes are scalars or vectors of length one. This should probably be considered a bug in h5netcdf, which I guess should the assumption from netCDF4-python that vector attributes of length 1 are scalars. (h5netcdf can store true scalar attributes in HDF5 files, but it's probably better to be consistent with netCDF)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,710876876 https://github.com/pydata/xarray/issues/4471#issuecomment-703286087,https://api.github.com/repos/pydata/xarray/issues/4471,703286087,MDEyOklzc3VlQ29tbWVudDcwMzI4NjA4Nw==,2448579,2020-10-04T17:12:32Z,2020-10-04T17:12:32Z,MEMBER,"> adapt other components to handle either scalars or length 1 arrays I think we can make this change safely in the decoding machinery. As you point out, it will be backwards compatible.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,710876876 https://github.com/pydata/xarray/issues/4471#issuecomment-702872015,https://api.github.com/repos/pydata/xarray/issues/4471,702872015,MDEyOklzc3VlQ29tbWVudDcwMjg3MjAxNQ==,2448579,2020-10-02T17:50:36Z,2020-10-02T17:50:36Z,MEMBER,"> other components (such as where the scale factor and add_offset are applied) need to be adapted to handle arrays of length 1 for those values. Great diagnosis @gerritholl . This could be fixed here (I think): https://github.com/pydata/xarray/blob/333e8dba55f0165ccadf18f2aaaee9257a4d716b/xarray/coding/variables.py#L245-L263 Are you up for sending in a PR?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,710876876