mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Use generator in place of list
This commit is contained in:
parent
9a78d13212
commit
61aec6051a
1 changed files with 1 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
import numpy as np
|
||||
import itertools as it
|
||||
import operator as op
|
||||
from functools import reduce
|
||||
import math
|
||||
|
@ -14,7 +13,7 @@ from manimlib.utils.iterables import adjacent_pairs
|
|||
|
||||
|
||||
def get_norm(vect):
|
||||
return sum([x**2 for x in vect])**0.5
|
||||
return sum((x**2 for x in vect))**0.5
|
||||
|
||||
|
||||
# Quaternions
|
||||
|
|
Loading…
Add table
Reference in a new issue