@@ -42,9 +42,7 @@ We will use the following imports:
4242import matplotlib.pyplot as plt
4343import numpy as np
4444from numpy.linalg import matrix_power
45- from matplotlib import cm
4645from matplotlib.lines import Line2D
47- from mpl_toolkits.mplot3d import Axes3D
4846from matplotlib.patches import FancyArrowPatch
4947from mpl_toolkits.mplot3d import proj3d
5048```
@@ -519,7 +517,8 @@ transformation $AB$ and then compare it with the transformation $BA$.
519517``` {code-cell} ipython3
520518:tags: [hide-input]
521519
522- def grid_composition_transform(A=np.array([[1, -1], [1, 1]]), B=np.array([[1, -1], [1, 1]])):
520+ def grid_composition_transform(A=np.array([[1, -1], [1, 1]]),
521+ B=np.array([[1, -1], [1, 1]])):
523522 xvals = np.linspace(-4, 4, 9)
524523 yvals = np.linspace(-3, 3, 7)
525524 xygrid = np.column_stack([[x, y] for x in xvals for y in yvals])
@@ -574,7 +573,7 @@ grid_composition_transform(A, B) # transformation AB
574573#### Rotate then shear
575574
576575``` {code-cell} ipython3
577- grid_composition_transform(B,A) #transformation BA
576+ grid_composition_transform(B,A) # transformation BA
578577```
579578
580579+++ {"user_expressions": [ ] }
@@ -1241,8 +1240,8 @@ for i, example in enumerate(examples):
12411240 u, v = np.tensordot(M, vec_field, axes=1)
12421241
12431242 # Plot the transformed vector field
1244- c = ax[i].streamplot(x, y, u - x, v - y,
1245- density=1, linewidth=None, color='#A23BEC')
1243+ c = ax[i].streamplot(x, y, u - x, v - y, density=1,
1244+ linewidth=None, color='#A23BEC')
12461245 c.lines.set_alpha(0.5)
12471246 c.arrows.set_alpha(0.5)
12481247
0 commit comments