Skip to content

Conversation

SHARANcanCODE
Copy link

Description

This PR fixes issue #4244 where calling get_number_mobjects() on a NumberLine object would raise an AttributeError because the default_numbers_to_display() method was missing.

Changes Made

  • Added the missing default_numbers_to_display() method to the NumberLine class
  • The method returns the tick range excluding numbers in the numbers_to_exclude list
  • Added proper documentation for the new method

Testing

  • Verified that the method exists and is properly called from get_number_mobjects()
  • Tested the method logic with and without exclusions
  • The original failing code from the issue should now work correctly

Fixes

Closes #4244

…rs_to_display'

- Add missing default_numbers_to_display() method to NumberLine class
- Method returns tick range excluding numbers in numbers_to_exclude list
- Resolves issue where get_number_mobjects() would fail with AttributeError
- Fixes ManimCommunity#4244
@qiuhaining
Copy link

qiuhaining commented Aug 31, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

AttributeError: NumberLine object has no attribute 'default_numbers_to_display' when calling get_number_mobjects()
2 participants