@@ -1914,8 +1914,8 @@ def rotate(self, theta):
1914
1914
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
1915
1915
and :meth:`scale`.
1916
1916
"""
1917
- a = np .cos (theta )
1918
- b = np .sin (theta )
1917
+ a = math .cos (theta )
1918
+ b = math .sin (theta )
1919
1919
rotate_mtx = np .array ([[a , - b , 0.0 ], [b , a , 0.0 ], [0.0 , 0.0 , 1.0 ]],
1920
1920
float )
1921
1921
self ._mtx = np .dot (rotate_mtx , self ._mtx )
@@ -1930,7 +1930,7 @@ def rotate_deg(self, degrees):
1930
1930
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
1931
1931
and :meth:`scale`.
1932
1932
"""
1933
- return self .rotate (np . deg2rad (degrees ))
1933
+ return self .rotate (math . radians (degrees ))
1934
1934
1935
1935
def rotate_around (self , x , y , theta ):
1936
1936
"""
@@ -2002,8 +2002,8 @@ def skew(self, xShear, yShear):
2002
2002
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
2003
2003
and :meth:`scale`.
2004
2004
"""
2005
- rotX = np .tan (xShear )
2006
- rotY = np .tan (yShear )
2005
+ rotX = math .tan (xShear )
2006
+ rotY = math .tan (yShear )
2007
2007
skew_mtx = np .array (
2008
2008
[[1.0 , rotX , 0.0 ], [rotY , 1.0 , 0.0 ], [0.0 , 0.0 , 1.0 ]], float )
2009
2009
self ._mtx = np .dot (skew_mtx , self ._mtx )
@@ -2021,7 +2021,7 @@ def skew_deg(self, xShear, yShear):
2021
2021
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
2022
2022
and :meth:`scale`.
2023
2023
"""
2024
- return self .skew (np . deg2rad (xShear ), np . deg2rad (yShear ))
2024
+ return self .skew (math . radians (xShear ), math . radians (yShear ))
2025
2025
2026
2026
2027
2027
class IdentityTransform (Affine2DBase ):
0 commit comments