Skip to content

Conversation

yang-tsao
Copy link
Contributor

The insert_n_curves_to_point_list function requires the points argument to be a numpy array, since it calls the get_bezier_tuples_from_points function, which requires points to be a numpy array because it has the return points.reshape((-1, nppc, 3)) statement. Ordinary lists do not have a reshape method.

So we need to convert sp1 and sp2 to numpy arrays before calling the insert_n_curves_to_point_list function.

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

I fixed the get_nth_subpath function, so it will work with the opengl renderer.

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

yang-tsao and others added 3 commits May 29, 2024 20:54
The "insert_n_curves_to_point_list" function requires the "points" argument to be a numpy array, since it calls the "get_bezier_tuples_from_points" function, which requires "points" to be a numpy array because it has the "return points.reshape((-1, nppc, 3))" statement. Ordinary lists do not have a "reshape" method.

So we need to convert "sp1" and "sp2" to numpy arrays before calling the "insert_n_curves_to_point_list" function.
Update opengl_vectorized_mobject.py
Copy link
Contributor

@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 your contribution!

@chopan050
Copy link
Contributor

Closes #3038

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

Successfully merging this pull request may close these issues.

3 participants