mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix bug for single-valued ValueTracker
This commit is contained in:
parent
e40a2935b1
commit
0dc096bf57
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue