Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Numpy contains some tests ( fp_noncontiguous, fpclass, test_numeric) that perform checks on the signs of NaNs. These checks fail on RISC-V and have been disabled in the following PRs
allowing numpy's tests to pass on RISC-V and allowing us to enable CI for RISC-V on upstream numpy.
However, there is a concern, that the checks on the sign bit of NaNs in the numpy tests are actually invalid for all platforms (as it depends on an optional part of the floating point specs) and it should be removed entirely. If the checks are left enabled, people may infer that testing the sign of a NaN is a valid thing to do, which it isn't in portable code.
More research is needed here around the use of NaNs in numpy and perhaps python itself.
Numpy contains some tests ( fp_noncontiguous, fpclass, test_numeric) that perform checks on the signs of NaNs. These checks fail on RISC-V and have been disabled in the following PRs
https://github.com/numpy/numpy/pull/25430
https://github.com/numpy/numpy/pull/25280
allowing numpy's tests to pass on RISC-V and allowing us to enable CI for RISC-V on upstream numpy.
However, there is a concern, that the checks on the sign bit of NaNs in the numpy tests are actually invalid for all platforms (as it depends on an optional part of the floating point specs) and it should be removed entirely. If the checks are left enabled, people may infer that testing the sign of a NaN is a valid thing to do, which it isn't in portable code.
More research is needed here around the use of NaNs in numpy and perhaps python itself.