Skip to content

Commit 36b86c5

Browse files
MAINT: organize imports
1 parent 04c0c25 commit 36b86c5

File tree

73 files changed

+169
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+169
-143
lines changed

examples/animations/animate_angle_axis_interpolation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
interpolate with slerp.
1212
"""
1313

14-
import numpy as np
14+
import matplotlib.animation as animation
1515
import matplotlib.pyplot as plt
16+
import numpy as np
1617
from mpl_toolkits.mplot3d import axes3d # noqa: F401
17-
import matplotlib.animation as animation
18+
1819
from pytransform3d import rotations as pr
1920

2021
velocity = None

examples/animations/animate_camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
Animate a camera moving along a circular trajectory while looking at a target.
77
"""
88

9-
import matplotlib.pyplot as plt
109
import matplotlib.animation as animation
10+
import matplotlib.pyplot as plt
1111
import numpy as np
1212

13+
from pytransform3d.plot_utils import Frame, Camera, make_3d_axis
1314
from pytransform3d.rotations import matrix_from_euler
1415
from pytransform3d.transformations import transform_from
15-
from pytransform3d.plot_utils import Frame, Camera, make_3d_axis
1616

1717

1818
def update_camera(step, n_frames, camera):

examples/animations/animate_quaternion_integration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
Integrate angular accelerations to a quaternion sequence and animate it.
77
"""
88

9-
import numpy as np
9+
import matplotlib.animation as animation
1010
import matplotlib.pyplot as plt
11+
import numpy as np
1112
from mpl_toolkits.mplot3d import axes3d # noqa: F401
12-
import matplotlib.animation as animation
13+
1314
from pytransform3d import rotations as pr
1415

1516

examples/animations/animate_quaternion_interpolation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
slerp.
1212
"""
1313

14-
import numpy as np
14+
import matplotlib.animation as animation
1515
import matplotlib.pyplot as plt
16+
import numpy as np
1617
from mpl_toolkits.mplot3d import axes3d # noqa: F401
17-
import matplotlib.animation as animation
18-
from pytransform3d import rotations as pr
1918

19+
from pytransform3d import rotations as pr
2020

2121
velocity = None
2222
last_R = None

examples/animations/animate_rotation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
that will be rotated about the x-axis.
99
"""
1010

11-
import numpy as np
11+
import matplotlib.animation as animation
1212
import matplotlib.pyplot as plt
13+
import numpy as np
1314
from mpl_toolkits.mplot3d import axes3d # noqa: F401
14-
import matplotlib.animation as animation
15-
from pytransform3d.plot_utils import Frame
15+
1616
from pytransform3d import rotations as pr
17+
from pytransform3d.plot_utils import Frame
1718

1819

1920
def update_frame(step, n_frames, frame):

examples/animations/animate_trajectory.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
Animates a trajectory.
77
"""
88

9-
import numpy as np
9+
import matplotlib.animation as animation
1010
import matplotlib.pyplot as plt
11+
import numpy as np
1112
from mpl_toolkits.mplot3d import axes3d # noqa: F401
12-
import matplotlib.animation as animation
13+
1314
from pytransform3d.plot_utils import Trajectory
1415
from pytransform3d.rotations import passive_matrix_from_angle, R_id
1516
from pytransform3d.transformations import transform_from, concat

examples/apps/app_transformation_editor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
The transformation editor can be used to manipulate transformations.
77
"""
88

9-
from pytransform3d.transform_manager import TransformManager
109
from pytransform3d.editor import TransformEditor
11-
from pytransform3d.transformations import transform_from
1210
from pytransform3d.rotations import active_matrix_from_extrinsic_euler_xyx
13-
11+
from pytransform3d.transform_manager import TransformManager
12+
from pytransform3d.transformations import transform_from
1413

1514
tm = TransformManager()
1615

examples/plots/plot_axis_angle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
axis.
99
"""
1010

11-
import numpy as np
1211
import matplotlib.pyplot as plt
12+
import numpy as np
13+
1314
from pytransform3d.rotations import (
1415
random_axis_angle,
1516
matrix_from_axis_angle,
1617
plot_basis,
1718
plot_axis_angle,
1819
)
1920

20-
2121
original = random_axis_angle(np.random.RandomState(5))
2222
ax = plot_axis_angle(a=original)
2323
for fraction in np.linspace(0, 1, 50):

examples/plots/plot_axis_angle_from_two_vectors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
lines.
1212
"""
1313

14-
import numpy as np
1514
import matplotlib.pyplot as plt
15+
import numpy as np
16+
17+
from pytransform3d.plot_utils import make_3d_axis, plot_vector
1618
from pytransform3d.rotations import (
1719
axis_angle_from_two_directions,
1820
matrix_from_axis_angle,
1921
plot_axis_angle,
2022
plot_basis,
2123
)
22-
from pytransform3d.plot_utils import make_3d_axis, plot_vector
23-
2424

2525
a = np.array([1.0, 0.0, 0.0])
2626
b = np.array([0.76958075, -0.49039301, -0.40897453])

examples/plots/plot_bivector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
normalizing the vector.
1414
"""
1515

16-
import numpy as np
1716
import matplotlib.pyplot as plt
18-
import pytransform3d.rotations as pr
17+
import numpy as np
1918

19+
import pytransform3d.rotations as pr
2020

2121
a = np.array([0.6, 0.3, 0.9])
2222
b = np.array([0.4, 0.8, 0.2])

0 commit comments

Comments
 (0)