mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 21:39:30 +08:00
Fix im_self access in Python 3.
This commit is contained in:
@@ -5,6 +5,8 @@ from skimage.util import img_as_float
|
||||
from ._warps_cy import _warp_fast
|
||||
|
||||
from skimage._shared.utils import get_bound_method_class
|
||||
from skimage._shared import six
|
||||
|
||||
|
||||
class GeometricTransform(object):
|
||||
"""Perform geometric transformations on a set of coordinates.
|
||||
@@ -1012,7 +1014,7 @@ def warp(image, inverse_map=None, map_args={}, output_shape=None, order=1,
|
||||
elif hasattr(inverse_map, '__name__') \
|
||||
and inverse_map.__name__ == 'inverse' \
|
||||
and get_bound_method_class(inverse_map) in HOMOGRAPHY_TRANSFORMS:
|
||||
matrix = np.linalg.inv(inverse_map.im_self._matrix)
|
||||
matrix = np.linalg.inv(six.get_method_self(inverse_map)._matrix)
|
||||
if matrix is not None:
|
||||
# transform all bands
|
||||
dims = []
|
||||
|
||||
Reference in New Issue
Block a user