Closed martinfleis closed 3 months ago
The explanation is the new stable
keyword in argsort
- https://numpy.org/doc/stable/reference/generated/numpy.argsort.html
Sort stability. If True, the returned array will maintain the relative order of a values which compare as equal. If False or None, this is not guaranteed. Internally, this option selects kind='stable'. Default: None.
I will actually probably push another commit passing stable=True
as I am a bit itchy when it comes to order and graph.
I am +1 for explicit.
Fixes #724
In the end, the results were just in a slightly different order but (head, tail, weight) tuple was always correct. Given we do sorting ourselves in the constructor anyway, this has no impact on creation of graph. Just an intermediate arrays are in different order. Canonically sorting the output before assertion solves the issue.
If you build the full Graph using
build_triangulation
, they are identical.