mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 11:03:03 +08:00
Fix bug for single-valued ValueTracker
This commit is contained in:
@ -28,7 +28,10 @@ class ValueTracker(Mobject):
|
||||
)
|
||||
|
||||
def get_value(self):
|
||||
return self.data["value"][0, :]
|
||||
result = self.data["value"][0, :]
|
||||
if len(result) == 1:
|
||||
return result[0]
|
||||
return result
|
||||
|
||||
def set_value(self, value):
|
||||
self.data["value"][0, :] = value
|
||||
|
Reference in New Issue
Block a user