Video editing with Python
Fix color_gradient crash (#1212)
Tom Burrows5b4441482c48
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fbab857b..788af6d1 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)diff --git a/moviepy/video/tools/drawing.py b/moviepy/video/tools/drawing.pyindex d3eabc8e..748a8d1b 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)