issue_comments
8 rows where issue = 868907284 and user = 6503378 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- 'NaT' as fill value and netcdf export · 8 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
831966730 | https://github.com/pydata/xarray/issues/5223#issuecomment-831966730 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgzMTk2NjczMA== | jvail 6503378 | 2021-05-04T14:02:32Z | 2021-05-04T14:02:32Z | NONE |
Ok. I'll prepare a better example, will try to come up with a suggestion and create an issue over there. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
831263359 | https://github.com/pydata/xarray/issues/5223#issuecomment-831263359 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgzMTI2MzM1OQ== | jvail 6503378 | 2021-05-03T13:35:09Z | 2021-05-03T13:36:32Z | NONE |
Yes, thank you @benbovy , that works for me as well as a work-around. However .. (excuse my stubbornness): I tried writing a simple array from ds -> zarr -> nc -> ds. Surprisingly everything works fine. Even the fill value is there (with and w/o mask_and_scale). It might be a xarray simlab issue and something goes wrong when writing/reading to/from zarr. Should I create an issue over there and close this one? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
829023263 | https://github.com/pydata/xarray/issues/5223#issuecomment-829023263 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyOTAyMzI2Mw== | jvail 6503378 | 2021-04-29T07:59:55Z | 2021-05-02T09:03:40Z | NONE |
Sure, thank you. I'll put a notebook together I hope this helps: https://github.com/jvail/xarray-simlab/blob/test_encoding_netcdf/notebooks/test_encoding_netcdf.ipynb ---- edit
If I serialize to a dict after popping the
Removing the entire encoding obj from the variable with dtype datetime64 seems to work as well. However, no idea, if that is a good idea. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
829013469 | https://github.com/pydata/xarray/issues/5223#issuecomment-829013469 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyOTAxMzQ2OQ== | jvail 6503378 | 2021-04-29T07:44:58Z | 2021-04-29T07:44:58Z | NONE |
Hm, now I get |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
828410285 | https://github.com/pydata/xarray/issues/5223#issuecomment-828410285 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyODQxMDI4NQ== | jvail 6503378 | 2021-04-28T12:23:02Z | 2021-04-28T12:23:02Z | NONE |
Thank you @benbovy! I could not have pinned down the issue myself. I guess if I manually drop the Not sure if this should be closed or maybe moved to xarray-simlab? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
828171777 | https://github.com/pydata/xarray/issues/5223#issuecomment-828171777 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyODE3MTc3Nw== | jvail 6503378 | 2021-04-28T06:07:33Z | 2021-04-28T06:07:56Z | NONE |
The issue is gone if I have neither an |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
828159821 | https://github.com/pydata/xarray/issues/5223#issuecomment-828159821 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyODE1OTgyMQ== | jvail 6503378 | 2021-04-28T05:40:46Z | 2021-04-28T05:40:46Z | NONE |
Sorry, overlooked that one. I'll dig in the simlab code.
Ok, that would make sense if '_FillValue' would just be an ordinary attr. But it seems it is not. If I set it to a string 'NaT' netcdf complains. ``` lib/python3.8/site-packages/scipy/io/netcdf.py in _get_encoded_fill_value(self) 1030 """ 1031 if '_FillValue' in self._attributes: -> 1032 fill_value = np.array(self._attributes['_FillValue'], 1033 dtype=self.data.dtype).tobytes() 1034 if len(fill_value) == self.itemsize(): ValueError: could not convert string to float: b'NaT' ``` If I set it to 0 I do not get an error. But then - after reloading the netcdf file - my NaT becomes |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 | |
828151911 | https://github.com/pydata/xarray/issues/5223#issuecomment-828151911 | https://api.github.com/repos/pydata/xarray/issues/5223 | MDEyOklzc3VlQ29tbWVudDgyODE1MTkxMQ== | jvail 6503378 | 2021-04-28T05:20:50Z | 2021-04-28T05:22:00Z | NONE | Re-Hello and thank you, hm, so the proper way (if necessary at all) would be to set
rather than putting it in Maybe I make a mistake in xarray-simlab and I should set the encoding explicitly and my confusion comes from having |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
'NaT' as fill value and netcdf export 868907284 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 1