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/7096#issuecomment-1265711007,https://api.github.com/repos/pydata/xarray/issues/7096,1265711007,IC_kwDOAMm_X85LcTef,2448579,2022-10-03T16:22:19Z,2022-10-03T16:22:19Z,MEMBER,"As in #7098 > I think the real solution here is to explicitly handle NaNs during the decoding step. We do want these to be NaT in the output.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1264693714,https://api.github.com/repos/pydata/xarray/issues/7096,1264693714,IC_kwDOAMm_X85LYbHS,5635139,2022-10-02T17:27:33Z,2022-10-02T17:27:33Z,MEMBER,"> I got the same result in riscv64. One thing I could guess is that the sign bit of NaN is not kept during conversions. Some more details could be found at Thanks for trying that. Notably, that code doesn't have xarray in. So I'm keen to be part of the solution, but it doesn't look to be a problem with xarray code specifically. Let me know if that makes sense.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1264643360,https://api.github.com/repos/pydata/xarray/issues/7096,1264643360,IC_kwDOAMm_X85LYO0g,1006477,2022-10-02T13:23:06Z,2022-10-02T13:23:06Z,NONE,"Hi, we are getting similar failures when building xarray for Arch Linux riscv64. > I'm not sure what that has to do with xarray though? Does this give the same result? > > ``` > import numpy as np > import pandas as pd > num_dates = np.asarray([0., np.nan]) > flat_num_dates = num_dates.ravel() > flat_num_dates_ns_int = (flat_num_dates * (int(1e9) * 60 * 60 * 24)).astype(np.int64) > flat_num_dates_ns_int > array([ 0, 9223372036854775807]) > ``` I got the same result in riscv64. One thing I could guess is that the sign bit of NaN is not kept during conversions. Some more details could be found at: https://sourceware.org/pipermail/libc-alpha/2022-September/142011.html Repeating the same steps result in `array([0, -9223372036854775808])` in x86_64 and `array([0, 0])` in aarch64. > > Please could you answer the question on whether pandas tests pass? I have tried pandas' tests and got many failures like: ``` E AssertionError: Attributes of DataFrame.iloc[:, 4] (column name=""date"") are different E E Attribute ""dtype"" are different E [left]: float64 E [right]: datetime64[ns] ``` or ``` E AssertionError: numpy array are different E E numpy array values are different (50.0 %) E [index]: [0, 1] E [left]: [1036713600000, -9223372036854775808] E [right]: [1036713600000000000, -9223372036854775808] ``` Quite some of the tests are having NaN in the context as well. So you are probably right that pandas or numpy may be where the problem lies.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1264535517,https://api.github.com/repos/pydata/xarray/issues/7096,1264535517,IC_kwDOAMm_X85LX0fd,5635139,2022-10-02T02:47:22Z,2022-10-02T02:47:22Z,MEMBER,Closing but please feel free to reopen,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1261481952,https://api.github.com/repos/pydata/xarray/issues/7096,1261481952,IC_kwDOAMm_X85LMK_g,5635139,2022-09-28T21:26:09Z,2022-09-28T21:26:09Z,MEMBER,"I'm not sure what that has to do with xarray though? Does this give the same result? ``` import numpy as np import pandas as pd num_dates = np.asarray([0., np.nan]) flat_num_dates = num_dates.ravel() flat_num_dates_ns_int = (flat_num_dates * (int(1e9) * 60 * 60 * 24)).astype(np.int64) flat_num_dates_ns_int array([ 0, 9223372036854775807]) ``` > Please could you answer the question on whether pandas tests pass? We're here helping as volunteers; we can only engage on issues if you reciprocate our good faith. Please could you answer this?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1261436738,https://api.github.com/repos/pydata/xarray/issues/7096,1261436738,IC_kwDOAMm_X85LL_9C,2175493,2022-09-28T20:35:34Z,2022-09-28T20:35:34Z,NONE,"array([ 0, 9223372036854775807]) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1261412104,https://api.github.com/repos/pydata/xarray/issues/7096,1261412104,IC_kwDOAMm_X85LL58I,5635139,2022-09-28T20:07:57Z,2022-09-28T20:07:57Z,MEMBER,"What are the bogus values? Please could you answer the question on whether pandas tests pass?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1261313113,https://api.github.com/repos/pydata/xarray/issues/7096,1261313113,IC_kwDOAMm_X85LLhxZ,2175493,2022-09-28T18:31:14Z,2022-09-28T18:31:14Z,NONE,"On Sep 28 2022, Maximilian Roos wrote: > It looks lie many of these occur in pandas code — do pandas tests pass? That's because xarray is passing bogus values. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400 https://github.com/pydata/xarray/issues/7096#issuecomment-1261237590,https://api.github.com/repos/pydata/xarray/issues/7096,1261237590,IC_kwDOAMm_X85LLPVW,5635139,2022-09-28T17:34:03Z,2022-09-28T17:34:03Z,MEMBER,It looks lie many of these occur in pandas code — do pandas tests pass?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1389019400