Skip to content

Commit 1030e8d

Browse files
committed
Fix OpenGLMobject methods doctests
1 parent 0c45389 commit 1030e8d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

manim/mobject/opengl/opengl_mobject.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,15 +1908,16 @@ def stretch_to_fit_width(self, width: float, **kwargs) -> Self:
19081908
::
19091909
19101910
>>> from manim import *
1911+
>>> import numpy as np
19111912
>>> sq = Square()
19121913
>>> sq.height
1913-
2.0
1914+
np.float64(2.0)
19141915
>>> sq.stretch_to_fit_width(5)
19151916
Square
19161917
>>> sq.width
1917-
5.0
1918+
np.float64(5.0)
19181919
>>> sq.height
1919-
2.0
1920+
np.float64(2.0)
19201921
"""
19211922
return self.rescale_to_fit(width, 0, stretch=True, **kwargs)
19221923

@@ -1941,15 +1942,16 @@ def set_width(self, width: float, stretch: bool = False, **kwargs) -> Self:
19411942
::
19421943
19431944
>>> from manim import *
1945+
>>> import numpy as np
19441946
>>> sq = Square()
19451947
>>> sq.height
1946-
2.0
1948+
np.float64(2.0)
19471949
>>> sq.scale_to_fit_width(5)
19481950
Square
19491951
>>> sq.width
1950-
5.0
1952+
np.float64(5.0)
19511953
>>> sq.height
1952-
5.0
1954+
np.float64(5.0)
19531955
"""
19541956
return self.rescale_to_fit(width, 0, stretch=stretch, **kwargs)
19551957

0 commit comments

Comments
 (0)