mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-13 12:40:24 +08:00
ENH: initialize AffineTransform to identity when no args are provided
This commit is contained in:
@@ -297,6 +297,11 @@ class AffineTransform(ProjectiveTransform):
|
|||||||
[ 0, 0, 1]
|
[ 0, 0, 1]
|
||||||
])
|
])
|
||||||
self._matrix[0:2, 2] = translation
|
self._matrix[0:2, 2] = translation
|
||||||
|
else:
|
||||||
|
# -- Default to an identity transform
|
||||||
|
self._matrix = np.asarray(
|
||||||
|
[[1, 0, 0], [0, 1, 0], [0, 0, 0]],
|
||||||
|
dtype='float64')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def scale(self):
|
def scale(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user