def set_goal_interval(self, IN):
"""Set the goal squared velocity interval.
Parameters
----------
IN: array or float
A single float, or a (2, ) array setting the goal
`(x_lower, x_higher)` squared path velocities.
Raises
------
AssertionError
If `IN` is a single, negative float. Or if `IN[0] > IN[1]`.
"""
IN = np.r_[IN].astype(float)
if IN.shape[0] == 1:
IN = np.array([IN[0], IN[0]])
elif IN.shape[0] > 2:
raise ValueError('Input IN has wrong dimension: {}'.format(IN.shape))
assert IN[1] >= IN[0], "Illegal input: non-increase end-points."
assert IN[0] >= 0, "Illegal input: negative lower end-point."
self.IN = IN
评论列表
文章目录