mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2026-01-27 10:21:48 +00:00
GitHub CI started failing with the following error:
assert (watt2dbm(si.signal) == target - correction).all()
assert False
+ where False = <built-in method all of numpy.ndarray object at 0x7f01c0ca94d0>()
+ where <built-in method all of numpy.ndarray object at 0x7f01c0ca94d0> = array([-25.5, -24.5, -22.5, -25. , -27.5]) == array([-25.5, -24.5, -22.5, -25. , -27.5])
+array([-25.5, -24.5, -22.5, -25. , -27.5])
-array([-25.5, -24.5, -22.5, -25. , -27.5])
Full diff:
array([-25.5, -24.5, -22.5, -25. , -27.5]).all
This is with code which has passed in the Zuul/Vexxhost CI.
It looks very similar to a regression that hit numpy 1.24.0, but the
GitHub action log shows that this happens with numpy 1.24.1. Weird, and
I'm not getting these differences locally, and also not on an ARM64
cloud VM.
Anyway, comparing floating point numbers for strict equality is futile,
so let's use this opportunity to use a proper check for these.
Change-Id: I05683f3116cad78d067bddde2780fe25b5caf768