issue_comments
8 rows where issue = 343659822 and user = 1217238 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray · 8 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1200314984 | https://github.com/pydata/xarray/issues/2304#issuecomment-1200314984 | https://api.github.com/repos/pydata/xarray/issues/2304 | IC_kwDOAMm_X85Hi1po | shoyer 1217238 | 2022-07-30T23:55:04Z | 2022-07-30T23:55:04Z | MEMBER |
Yes, I'm pretty sure "float" means single precision (np.float32), given that "double" certainly means double precision (no.float64).
Yes, I believe so.
I think we can treat this a bug fix and just go forward with it. Yes, some people are going to be surprised, but I don't think it's distruptive enough that we need to go to a major effort to preserve backwards compatibility. It should already be straightforward to work around by setting |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
462614107 | https://github.com/pydata/xarray/issues/2304#issuecomment-462614107 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQ2MjYxNDEwNw== | shoyer 1217238 | 2019-02-12T04:46:18Z | 2019-02-12T04:46:47Z | MEMBER | @magau thanks for pointing this out -- I think we simplify missed this part of the CF conventions document! Looking at the dtype for We will still need some fall-back choice for |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
410807622 | https://github.com/pydata/xarray/issues/2304#issuecomment-410807622 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQxMDgwNzYyMg== | shoyer 1217238 | 2018-08-06T18:33:06Z | 2018-08-06T18:33:06Z | MEMBER | Please let us know if converting to float64 explicitly and rounding again does not solve this issue for you. On Mon, Aug 6, 2018 at 10:47 AM Thomas Zilio notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
410787443 | https://github.com/pydata/xarray/issues/2304#issuecomment-410787443 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQxMDc4NzQ0Mw== | shoyer 1217238 | 2018-08-06T17:31:22Z | 2018-08-06T17:31:22Z | MEMBER | Both multiplying by 0.01 and float32 -> float64 are approximately equivalently expensive. The cost is dominated by the memory copy. On Mon, Aug 6, 2018 at 10:17 AM Ryan May notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
410781556 | https://github.com/pydata/xarray/issues/2304#issuecomment-410781556 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQxMDc4MTU1Ng== | shoyer 1217238 | 2018-08-06T17:13:27Z | 2018-08-06T17:13:27Z | MEMBER |
We automatically scale the data from int16->float32 upon reading it in xarray (if decode_cf=True). There's no way to turn that off and still get automatic scaling, so the best you can do is layer on int16->float32->float64, when you might prefer to only do int16->float64. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
410777201 | https://github.com/pydata/xarray/issues/2304#issuecomment-410777201 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQxMDc3NzIwMQ== | shoyer 1217238 | 2018-08-06T17:00:01Z | 2018-08-06T17:00:01Z | MEMBER |
It's almost but not quite identical. The difference is that the data gets scaled twice. This adds twice the overhead for scaling the values (which to be fair is usually negligible compared to IO). Also, to get exactly equivalent numerics for further computation you would need to round again, e.g., |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
410773312 | https://github.com/pydata/xarray/issues/2304#issuecomment-410773312 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQxMDc3MzMxMg== | shoyer 1217238 | 2018-08-06T16:47:11Z | 2018-08-06T16:47:22Z | MEMBER |
Right. The actual raw data is being stored as an integer I would be happy to add options for whether to default to float32 or float64 precision. There are clearly tradeoffs here: - float32 uses half the memory - float64 has more precision for downstream computation I don't think we can make a statement about which is better in general. The best we can do is make an educated guess about which will be more useful / less surprising for most and/or new users, and pick that as the default. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 | |
407087615 | https://github.com/pydata/xarray/issues/2304#issuecomment-407087615 | https://api.github.com/repos/pydata/xarray/issues/2304 | MDEyOklzc3VlQ29tbWVudDQwNzA4NzYxNQ== | shoyer 1217238 | 2018-07-23T14:57:20Z | 2018-07-23T14:57:20Z | MEMBER | To clarify: why is it a problem for you to get floating point values like 21.939998626708984 instead of 21.940000000000001? Is it a loss of precision in some downstream calculation? Both numbers are accurate well within the precision indicated by the netCDF file (0.01). Note that it's very easy to later convert from float32 to float64, e.g., by writing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
float32 instead of float64 when decoding int16 with scale_factor netcdf var using xarray 343659822 |
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