mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-10 12:40:08 +08:00
cast range to list for python3
This commit is contained in:
@@ -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