ManimCommunity / ManimCommunity/manim
Hope to add multi-dimensional slicing function for VGroup like Numpy.Array
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of proposed feature
A slice function like Numpy.Array,for example:
a = VGroup(Vgroup(..), ...) # 2 dim vgroup
a[1:4, 2:4] # slice
## How can the new feature be used?
Slice function will make great sense for 2 dim mobject vgroup,if 2 dim Square vgroup represents a image, I want to get a part of image(that is a patch),but there is no simple method to impIement it, I have tried many times to overwrite Vgroup's method __getitem__(succeed to Group),but there is bug, which will affect other functions.
## Additional comments
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with VGroup.__getitem__ and compare it with the existing Group behavior described in the issue. Reproduce the two-dimensional example a[1:4, 2:4] and investigate the reported effects on other functions. Done means multidimensional slicing works for nested VGroups without breaking existing indexing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100