Skip to content

Commit e14d7b3

Browse files
committed
move optimal_bench.py to steering_bench.py + small fixes
1 parent 2dc409b commit e14d7b3

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

benchmarks/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ you can use the following command from the root directory of the repository:
1111

1212
PYTHONPATH=`pwd` asv run --python=python
1313

14-
You can also run benchmarks against specific commits usuing
14+
You can also run benchmarks against specific commits using
1515

1616
asv run <range>
1717

control/flatsys/bezier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def eval_deriv(self, i, k, t, var=None):
7373
raise ValueError("Basis function index too high")
7474
elif k >= self.N:
7575
# Higher order derivatives are zero
76-
return np.zeros(t.shape)
76+
return 0 * t
7777

7878
# Compute the variables used in Bezier curve formulas
7979
n = self.N - 1

control/flatsys/poly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ def __init__(self, N, T=1):
6666
# Compute the kth derivative of the ith basis function at time t
6767
def eval_deriv(self, i, k, t, var=None):
6868
"""Evaluate the kth derivative of the ith basis function at time t."""
69-
if (i < k): return 0; # higher derivative than power
69+
if (i < k): return 0 * t # higher derivative than power
7070
return factorial(i)/factorial(i-k) * \
7171
np.power(t/self.T, i-k) / np.power(self.T, k)

0 commit comments

Comments
 (0)