mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-29 13:30:24 +08:00
Merge pull request #588 from sciunto/range
FIX: cast range to list for python3 compatibility
This commit is contained in:
commit
026ca77cfa
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user