Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 30, 2024
1 parent a4bf17b commit ca96427
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions manim/mobject/three_d/three_dimensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,10 @@ def __init__(
):
self.thickness = thickness
self.resolution = (2, resolution) if isinstance(resolution, int) else resolution
start = np.array(start,np.float64)
end = np.array(end,np.float64)

start = np.array(start, np.float64)
end = np.array(end, np.float64)

self.set_start_and_end_attrs(start, end, **kwargs)
if color is not None:
self.set_color(color)
Expand Down
9 changes: 5 additions & 4 deletions tests/test_graphical_units/test_threed.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ def test_get_start_and_end_Arrow3d():
arrow.get_end(), end, atol=0.01
), "end points of Arrow3D do not match"


def test_type_conversion_in_Line3D():
start,end = [0,0,0],[1,1,1]
line = Line3D(start,end)
type_table = [type(item) for item in [*line.get_start(),*line.get_end()]]
start, end = [0, 0, 0], [1, 1, 1]
line = Line3D(start, end)
type_table = [type(item) for item in [*line.get_start(), *line.get_end()]]
bool_table = [t == np.float64 for t in type_table]
assert all(bool_table), "Types of start and end points are not np.float64"
assert all(bool_table), "Types of start and end points are not np.float64"

0 comments on commit ca96427

Please sign in to comment.