Skip to content

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

@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Aug 4, 2025
@henrikmidtiby henrikmidtiby marked this pull request as ready for review August 14, 2025 06:33
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