You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use get_number_mobjects() on a NumberLine object, I encountered the following error:
AttributeError: NumberLine object has no attribute 'default_numbers_to_display'
It seems like the method get_number_mobjects() internally calls self.default_numbers_to_display(), but this method is either missing or no longer available in the current implementation of NumberLine.
Expected behavior
Calling get_number_mobjects() with no arguments should use default numbers (e.g., from x_range) to generate label mobjects.
How to reproduce the issue
Create a NumberLine object.
Call get_number_mobjects() without passing any explicit numbers.
Run the scene.
Code for reproducing the problem
frommanimimport*classIntroductionToComplexNumbers(Scene):
defconstruct(self):
# Create real number linereal_number_line=NumberLine(
x_range=[-5, 5, 1],
length=10,
include_tip=False,
)
real_number_line_labels=real_number_line.get_number_mobjects()
self.add(real_number_line, *real_number_line_labels)
It seems that the method .default_numbers_to_display() has been removed from Manim Community, but the code wasn't updated accordingly.
If your goal is to display numbers along the number line, you can do either of the following:
Use .add_numbers() after creating NumberLine object:
When users call .get_number_mobjects() or .get_labels() on a NumberLine object, it will still raise an AttributeError because .default_numbers_to_display() is being accessed but doesn't exist.
Description of bug / unexpected behavior
When attempting to use
get_number_mobjects()
on aNumberLine
object, I encountered the following error:It seems like the method
get_number_mobjects()
internally callsself.default_numbers_to_display()
, but this method is either missing or no longer available in the current implementation ofNumberLine
.Expected behavior
Calling
get_number_mobjects()
with no arguments should use default numbers (e.g., fromx_range
) to generate label mobjects.How to reproduce the issue
NumberLine
object.get_number_mobjects()
without passing any explicit numbers.Code for reproducing the problem
Logs
Terminal output
Logs
System specifications
System Details
The text was updated successfully, but these errors were encountered: