ENH: initialize AffineTransform to identity when no args are provided

This commit is contained in:
James Bergstra
2012-08-17 17:55:26 -04:00
parent 90e61e22ae
commit d0870c6d68
+5
View File
@@ -297,6 +297,11 @@ class AffineTransform(ProjectiveTransform):
[ 0, 0, 1]
])
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
def scale(self):