mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-11 02:29:27 +08:00
Merge pull request #588 from sciunto/range
FIX: cast range to list for python3 compatibility
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