Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

fix: prevent vector position array from being modified (#3273) (#3282)

Uwe Zimmermann124ed9d1a414
diff --git a/manim/mobject/vector_field.py b/manim/mobject/vector_field.py
index 14f2f64f3..88388bd71 100644
--- a/manim/mobject/vector_field.py
+++ b/manim/mobject/vector_field.py
@@ -613,7 +613,7 @@ class ArrowVectorField(VectorField):
The root point of the vector.
"""
- output = np.asarray(self.func(point))
+ output = np.array(self.func(point))
norm = np.linalg.norm(output)
if norm != 0:
output *= self.length_func(norm) / norm