summaryrefslogtreecommitdiff
path: root/examples/pybullet/unittests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pybullet/unittests/utils.py')
-rw-r--r--examples/pybullet/unittests/utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/pybullet/unittests/utils.py b/examples/pybullet/unittests/utils.py
index b3e5f68fe..b6ef61d41 100644
--- a/examples/pybullet/unittests/utils.py
+++ b/examples/pybullet/unittests/utils.py
@@ -1,7 +1,8 @@
def dot(A, b):
- """Dot product between a 2D matrix and a 1D vector"""
- return [sum([aij*bj for aij, bj in zip(ai, b)]) for ai in A]
+ """Dot product between a 2D matrix and a 1D vector"""
+ return [sum([aij * bj for aij, bj in zip(ai, b)]) for ai in A]
+
def allclose(a, b, tol=1e-7):
- """Are all elements of a vector close to one another"""
- return all([abs(ai - bi) < tol for ai, bi in zip(a,b)])
+ """Are all elements of a vector close to one another"""
+ return all([abs(ai - bi) < tol for ai, bi in zip(a, b)])