TOPP.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:toppra 作者: hungpham2511 项目源码 文件源码
def set_start_interval(self, I0):
        """Set starting *squared* velocities interval.


        Parameters
        ----------
        I0: array, or float
            (2, 0) array, the interval of starting squared path velocities.
            Can also be a float.

        Raises
        ------
        AssertionError
            If `I0` is a single, negative float. Or if `I0[0] > I0[1]`.

        """
        I0 = np.r_[I0].astype(float)
        if I0.shape[0] == 1:
            I0 = np.array([I0[0], I0[0]])
        elif I0.shape[0] > 2:
            raise ValueError('Input I0 has wrong dimension: {}'.format(I0.shape))
        assert I0[1] >= I0[0], "Illegal input: non-increase end-points."
        assert I0[0] >= 0, "Illegal input: negative lower end-point."

        self.I0 = I0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号