mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Use resize_points in Mobject.set_data
This commit is contained in:
parent
c4d698a169
commit
e36719a21b
1 changed files with 2 additions and 1 deletions
|
@ -182,7 +182,8 @@ class Mobject(object):
|
|||
@affects_data
|
||||
def set_data(self, data: np.ndarray) -> Self:
|
||||
assert(data.dtype == self.data.dtype)
|
||||
self.data = data.copy()
|
||||
self.resize_points(len(data))
|
||||
self.data[:] = data
|
||||
return self
|
||||
|
||||
@affects_data
|
||||
|
|
Loading…
Add table
Reference in a new issue