In Mobject.set_uniforms, copy uniforms that are numpy arrays

This commit is contained in:
Grant Sanderson 2022-04-21 14:30:39 -07:00
parent 6474e25fcd
commit c04615c4e9

View file

@ -136,8 +136,10 @@ class Mobject(object):
return self return self
def set_uniforms(self, uniforms: dict): def set_uniforms(self, uniforms: dict):
for key in uniforms: for key, value in uniforms.items():
self.uniforms[key] = uniforms[key] # Copy? if isinstance(value, np.ndarray):
value = value.copy()
self.uniforms[key] = value
return self return self
@property @property