Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Removed itertools.ifilter use

Grant Sanderson0cd4b9b64e8a
diff --git a/animation/composition.py b/animation/composition.py
index 51f4929ed..d13d31f30 100644
--- a/animation/composition.py
+++ b/animation/composition.py
@@ -147,10 +147,10 @@ class Succession(Animation):
self.current_alpha = alpha
return
- gt_alpha_iter = it.ifilter(
+ gt_alpha_iter = iter(filter(
lambda i: self.critical_alphas[i + 1] >= alpha,
- list(range(self.num_anims))
- )
+ range(self.num_anims)
+ ))
i = next(gt_alpha_iter, None)
if i is None:
# In this case, we assume what is happening is that alpha is 1.0,