mirror of
https://github.com/numpy/numpy.git
synced 2026-09-21 16:25:04 +00:00
Page:
FMod Bug on Windows
Pages
BLAS desiderata
Backwards incompatible ideas for a major release
Building on a mac
Debugging CI guidelines
Dispatching container functions (e.g., concatenate) to duck arrays
Dtype Brainstorming
FMod Bug on Windows
Getting Started With The C side of Numpy
Github Queries
Google Season of Docs 2020 Project Ideas
Google Season of Docs 2021 Project Ideas
Google Season of Docs 2021: NumPy Case Study
Google Season of Docs 2021: Submitted Project
Google Season of Docs 2022 NumPy Project
Google Season of Docs 2023: NumPy case study
Google Season of Docs 2023: Project Proposal
Google Season of Docs 2024: NumPy case study
Google Season of Docs 2024: Project Proposal
Home
NumPy Roadmap
NumPy roadmap v2
Numerical software on Windows
Numpy BoF at Scipy 2014
Promotion Difficulties
Reference Count Testing
SciPy 2015 developer meeting
Scipy 2013
Scripted responses
Teaching SciPy: BoF at Scipy 2014
Translations of the NumPy website
ufunc and binop overrides and behavior suggestions
No results
13
FMod Bug on Windows
Mingye Wang edited this page 2021-05-12 11:05:21 +08:00
Table of contents
There is a crashing bug with fmod on Windows 10 2004. KB4598291 of February 2021 fixes this issue.
To prevent unexpected runtime behavior, opencv (and numpy 1.19.4 through 1.19.5) contains a check for this:
from numpy import arange, linalg, float64
try:
a = arange(13 * 13, dtype=float64).reshape(13, 13)
a = a % 17 # calls fmod
linalg.eig(a)
except Exception:
raise RuntimeError("The current Numpy installation (...) fails to pass a sanity check due to a bug in the windows runtime...")
See Pull Request https://github.com/numpy/numpy/pull/17553. You can verify the behavior yourself using the script above too.
Workaround
If you are unable to upgrade Windows, you can:
- Pinning against NumPy 1.19.3 should help (it uses a newer OpenBLAS version, but this caused other problems). This can be achieved using e.g. with
pip install numpy==1.19.3or similar depending on your setup. To be clear: The only difference between NumPy 1.19.3 and 1.19.4 is the OpenBLAS version it ships.- Or you can go to earlier versions like 1.18.5. Expect more differences.
- 32bit Python does not have these issues
- In principle you could revert the buggy windows update or deactivate the
_win_os_checkin NumPy (if you are lucky, your code is unaffected by the bug).