Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve docstring for interpolate method in Mobject class #4149

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

irvanalhaq9
Copy link
Contributor

@irvanalhaq9 irvanalhaq9 commented Feb 3, 2025

Overview: What does this pull request change?

Improve docstring for interpolate method in Mobject class

Improvements:

This PR improves the documentation by explicitly stating that mobject1 and mobject2 must have the same number of points to avoid errors. It also provides a clear recommendation to use .align_points() when necessary.

Additionally, the updated example is more representative, demonstrating both cases: when point alignment is not needed (e.g., Dot) and when it is required (e.g., Line → Square). This makes it easier for users to understand when manual alignment is necessary.

A See Also section has been added to reference related methods, helping users explore relevant functionality more efficiently.

Links to added or changed documentation pages

Method interpolate: https://manimce--4149.org.readthedocs.build/en/4149/reference/manim.mobject.mobject.Mobject.html#manim.mobject.mobject.Mobject.interpolate

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

irvanalhaq9 and others added 22 commits February 4, 2025 02:32
@JasonGrace2282 JasonGrace2282 added the documentation Improvements or additions to documentation label Feb 9, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants