From dea5b7f1840aa6ea4f1de11a14eaa5a99ee7a6cd Mon Sep 17 00:00:00 2001 From: Viktor Roytman Date: Mon, 25 Apr 2016 11:33:23 -0400 Subject: [PATCH] Convert self.coords_values to np.array A different part of the code tried to access what used to be the distance matrix by indexing with a float. Fixes #57 --- sequencer/NetworkPlan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer/NetworkPlan.py b/sequencer/NetworkPlan.py index 275a424..36f8d9e 100644 --- a/sequencer/NetworkPlan.py +++ b/sequencer/NetworkPlan.py @@ -45,7 +45,7 @@ def __init__(self, shp, csv, **kwargs): loc_tol = self.TOL ) - self.coord_values = self.coords.values() + self.coord_values = np.array(self.coords.values()) # Set the edge weight to the distance between those nodes self._weight_edges()