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
def set_uniforms(self, uniforms: dict):
for key in uniforms:
self.uniforms[key] = uniforms[key] # Copy?
for key, value in uniforms.items():
if isinstance(value, np.ndarray):
value = value.copy()
self.uniforms[key] = value
return self
@property