Those all look like rounding errors (probably due to x87 excess precision, since they only happen on i386). This suggests that the appropriate response is either to ignore these tests on i386, or possibly (the graph object output by gdf_to_nx has (x: float, y: float) node keys, so rounding issues can potentially break retrieving individual nodes/edges) to remove this package on i386.
Your assessment of the situation is very likely correct, since the errors are 
very small.

The (IMHO) correct fix should be to replace all exact comparisons with 
approximative ones. I don't think subtle precision errors warrant removal of 
the package on i386, since this a very common and well-known issue of floating 
point math.

Either use something like:
assert results2.wd[0] == approx(8.50508193935929)
or rely on numpy comparisons (untested, may not work):
numpy.testing.assert_allclose(results2.wd[0], 8.50508193935929)

This should also be reported on the upstream bug tracker: 
https://github.com/pysal/momepy/issues

Reply via email to