Skip to content

Commit 0dc096b

Browse files
committed
Fix bug for single-valued ValueTracker
1 parent e40a293 commit 0dc096b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

manimlib/mobject/value_tracker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def init_data(self):
2828
)
2929

3030
def get_value(self):
31-
return self.data["value"][0, :]
31+
result = self.data["value"][0, :]
32+
if len(result) == 1:
33+
return result[0]
34+
return result
3235

3336
def set_value(self, value):
3437
self.data["value"][0, :] = value

0 commit comments

Comments
 (0)