From 6fb62e50a8d79dd748fab62cbd3054e98af57375 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Mon, 12 Oct 2026 08:40:51 +1000 Subject: [PATCH] fix: don't pass a positional argument to pgraph.UGraph pgraph 1.0 makes the graph constructor arguments keyword-only, so UGraph(6) raises TypeError. 0.6.5 accepted and ignored the 6, so the "6D coordinates" constraint was never in force; and it could not be: landmark vertices are 3D and view vertices 6D. Construct the graph with no argument, which behaves identically on 0.6.5 and 1.0, and correct the comment. Co-Authored-By: Claude Sonnet 5.5 --- src/machinevisiontoolbox/BundleAdjust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machinevisiontoolbox/BundleAdjust.py b/src/machinevisiontoolbox/BundleAdjust.py index fae5d2ce..d3ca98dd 100644 --- a/src/machinevisiontoolbox/BundleAdjust.py +++ b/src/machinevisiontoolbox/BundleAdjust.py @@ -205,7 +205,7 @@ def __init__(self, camera: CentralCamera) -> None: # - Observation for edges representing the observation of a landmark by # a view # - self.g = pgraph.UGraph(6) # initialize the graph, nodes have 6D coordinates + self.g = pgraph.UGraph() # views have 6D coordinates, landmarks 3D self._nviews = 0 # number of cameras self._nlandmarks = 0 # number of landmark points