mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Merge b4eed687b0
into f4737828f6
This commit is contained in:
commit
cc2ed85afa
2 changed files with 2 additions and 2 deletions
|
@ -1361,7 +1361,7 @@ class Mobject(object):
|
|||
rgbs = resize_with_interpolation(rgbs, len(data))
|
||||
data[name][:, :3] = rgbs
|
||||
if opacity is not None:
|
||||
if not isinstance(opacity, (float, int)):
|
||||
if not isinstance(opacity, (float, int, np.floating)):
|
||||
opacity = resize_with_interpolation(np.array(opacity), len(data))
|
||||
data[name][:, 3] = opacity
|
||||
return self
|
||||
|
|
|
@ -185,7 +185,7 @@ class VMobject(Mobject):
|
|||
if width is not None:
|
||||
for mob in self.get_family(recurse):
|
||||
data = mob.data if mob.get_num_points() > 0 else mob._data_defaults
|
||||
if isinstance(width, (float, int)):
|
||||
if isinstance(width, (float, int, np.floating)):
|
||||
data['stroke_width'][:, 0] = width
|
||||
else:
|
||||
data['stroke_width'][:, 0] = resize_with_interpolation(
|
||||
|
|
Loading…
Add table
Reference in a new issue