From da8680a7b8f29e35e124e618471ebb4c3f0b3d5c Mon Sep 17 00:00:00 2001 From: Tom Burrows Date: Mon, 1 Jun 2020 12:25:23 +0100 Subject: [PATCH 1/2] Implicitly casting a np.array to bool fails (#1205) --- moviepy/video/tools/drawing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moviepy/video/tools/drawing.py b/moviepy/video/tools/drawing.py index d3eabc8e3..748a8d1be 100644 --- a/moviepy/video/tools/drawing.py +++ b/moviepy/video/tools/drawing.py @@ -146,7 +146,7 @@ def color_gradient( vector = np.array(vector[::-1]) p2 = p1 + vector - if vector: + if vector is None: norm = np.linalg.norm(vector) M = np.dstack(np.meshgrid(range(w), range(h))[::-1]).astype(float) From 7c659835329e9f4def25092ad901fd2325c3e6e0 Mon Sep 17 00:00:00 2001 From: Tom Burrows Date: Mon, 1 Jun 2020 12:28:50 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbab857b6..788af6d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Blank frames at the end of clips [#210] - Sometimes getting `IndexError: list index out of range` when using `concatenate_videoclips` [#646] - Applying `resize` with a non-constant `newsize` to a clip with a mask would remove the mask [#1200] - +- Using `color_gradient()` would crash with `ValueError: The truth value of an array with more than one element is ambiguous` [#1212] ## [v1.0.3](https://github.com/zulko/moviepy/tree/v1.0.3) (2020-05-07)