Skip to content

Fix IndexError in get_nth_subpath() and ensure it always returns a NumPy array#4630

Merged
chopan050 merged 3 commits into
ManimCommunity:mainfrom
MqCreaple:main
Mar 18, 2026
Merged

Fix IndexError in get_nth_subpath() and ensure it always returns a NumPy array#4630
chopan050 merged 3 commits into
ManimCommunity:mainfrom
MqCreaple:main

Conversation

@MqCreaple
Copy link
Copy Markdown
Contributor

@MqCreaple MqCreaple commented Mar 7, 2026

Overview: What does this pull request change?

Fixes #3569 by making sure that get_nth_subpath() always returns a NumPy array
Fixes #4629 by falling back to a null curve at ORIGIN in the case that path_list is empty, preventing an IndexError.

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages

Further Information and Comments

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

@chopan050 chopan050 changed the title fix #3569 and #4629 Fix IndexError in get_nth_subpath() and ensure it always returns a NumPy array Mar 18, 2026
Copy link
Copy Markdown
Member

@chopan050 chopan050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for these fixes!

@chopan050 chopan050 merged commit 21cf999 into ManimCommunity:main Mar 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_nth_subpath throws exception get_nth_subpath can return List instead of expected type of NDArray.

2 participants