Merge pull request #588 from sciunto/range

FIX: cast range to list for python3 compatibility
This commit is contained in:
Josh Warner
2013-06-12 13:22:34 -07:00
+2 -2
View File
@@ -222,14 +222,14 @@ class ProjectiveTransform(GeometricTransform):
A[rows:, 8] = yd
# Select relevant columns, depending on params
A = A[:, self._coeffs + [8]]
A = A[:, list(self._coeffs) + [8]]
_, _, V = np.linalg.svd(A)
H = np.zeros((3, 3))
# solution is right singular vector that corresponds to smallest
# singular value
H.flat[self._coeffs + [8]] = - V[-1, :-1] / V[-1, -1]
H.flat[list(self._coeffs) + [8]] = - V[-1, :-1] / V[-1, -1]
H[2, 2] = 1
self._matrix = H