New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
darwin aarch64 skrf/calibration/tests/test_calibration.py failing with divide by zero (determinate calculations) #972
Comments
on macos aarch64 this simplified code produces a divide by zero warning but runs fine on x64 linux -- similar to the failing unit tests above. #!/usr/bin/env python3
import numpy as np
print(np.__version__)
a = np.array([[5.e-8+0.j, 1+0.j], [1+0.j, 5.e-8+0.j]])
print(a)
print(np.linalg.det(a)) ./test.py
1.25.2
[[5.e-08+0.j 1.e+00+0.j]
[1.e+00+0.j 5.e-08+0.j]]
/nix/store/rpdx49knxarbr4lmkwfi5l0461lyp6bd-python3-3.11.6-env/lib/python3.11/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: divide by zero encountered in det
r = _umath_linalg.det(a, signature=signature)
/nix/store/rpdx49knxarbr4lmkwfi5l0461lyp6bd-python3-3.11.6-env/lib/python3.11/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: invalid value encountered in det
r = _umath_linalg.det(a, signature=signature) |
note to future self: re-enable the failing test in nixpkgs if a fix is found |
This should be reported to https://github.com/numpy/numpy itself, but this probably related numpy/numpy#22025. |
Nevertheless we could modify the unit test slightly to avoid this issue. I'm afraid we are not able to find the root cause here. |
Describe the bug
updating to scikit-rf version 0.29.1 PR NixOS/nixpkgs#266389 fails in the unit test
skrf/calibration/tests/test_calibration.py
with divide by zero errors.numpy version is: 1.25.2, python is 3.11, darwin (macos) aarch64
unitfail.txt
1st failure pasted inline.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Data
If applicable, add the data leading to the issue (a minimum example is appreciated)
Screenshots
If applicable, add screenshots to help explain your problem.
System
Additional context
Add any other context about the problem here if relevant.
numpy version is: 1.25.2
python is 3.11
The text was updated successfully, but these errors were encountered: