Skip to content

Refactored the code and improved the docstring of vector_field.py#4705

Open
GoThrones wants to merge 2 commits intoManimCommunity:mainfrom
GoThrones:vector_field
Open

Refactored the code and improved the docstring of vector_field.py#4705
GoThrones wants to merge 2 commits intoManimCommunity:mainfrom
GoThrones:vector_field

Conversation

@GoThrones
Copy link
Copy Markdown
Contributor

Overview: What does this pull request change?

This PR makes a minor alteration in the code of ArrowVectorField class and StreamLines class. Improves the docstring of all three classes in vector_field.py

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

The code related to x, y and z ranges was duplicated in ArrowVectorField class and StreamLines class. I've put that code in VectorField class, and the ArrowVectorField and StreamLines class invoke the method _setup_ranges() to setup the ranges.

The docstring were misleading at few places. The parameters were not explained properly.

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

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.

1 participant