Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
move optimal_bench.py to steering_bench.py + small fixes
  • Loading branch information
murrayrm committed Nov 19, 2022
commit e14d7b37ae9b3958d7adbc970f0f57fbda593d84
2 changes: 1 addition & 1 deletion benchmarks/README
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ you can use the following command from the root directory of the repository:

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

You can also run benchmarks against specific commits usuing
You can also run benchmarks against specific commits using

asv run <range>

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion control/flatsys/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def eval_deriv(self, i, k, t, var=None):
raise ValueError("Basis function index too high")
elif k >= self.N:
# Higher order derivatives are zero
return np.zeros(t.shape)
return 0 * t

# Compute the variables used in Bezier curve formulas
n = self.N - 1
Expand Down
2 changes: 1 addition & 1 deletion control/flatsys/poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ def __init__(self, N, T=1):
# Compute the kth derivative of the ith basis function at time t
def eval_deriv(self, i, k, t, var=None):
"""Evaluate the kth derivative of the ith basis function at time t."""
if (i < k): return 0; # higher derivative than power
if (i < k): return 0 * t # higher derivative than power
return factorial(i)/factorial(i-k) * \
np.power(t/self.T, i-k) / np.power(self.T, k)