Skip to content

Fix for issue 3562 - OpenGL: DecimalNumber set_value #4373

New issue

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

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

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

henrikmidtiby
Copy link
Contributor

Overview: What does this pull request change?

This PR solves issue #3562.

Further Information and Comments

The issue was inside these lines of the set_stroke method of the OpenGLVMobject class.

if width is not None:
  for mob in self.get_family(recurse):
    mob.stroke_width = np.array([[width] for width in tuplify(width)])

Each time set_stroke was called with the width parameter set to an ndarray, it increased the nesting of the array.
This worked fine until the nesting reached a depth of 64 levels, where numpy bailed out.

The suggested change is to check if width is an ndarray and if that is the case just use that value, in the other case use the old behaviour.

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

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.

1 participant