mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 11:37:45 +00:00
Add Self type to value_tracker.py
This commit is contained in:
parent
031adda503
commit
468fdf9003
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from typing import Self
|
||||||
from manimlib.mobject.mobject import Mobject
|
from manimlib.mobject.mobject import Mobject
|
||||||
from manimlib.utils.iterables import listify
|
from manimlib.utils.iterables import listify
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ class ValueTracker(Mobject):
|
||||||
return result[0]
|
return result[0]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def set_value(self, value: float | complex | np.ndarray):
|
def set_value(self, value: float | complex | np.ndarray) -> Self:
|
||||||
self.uniforms["value"][:] = value
|
self.uniforms["value"][:] = value
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue