points.py 文件源码

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

项目:autolab_core 作者: BerkeleyAutomation 项目源码 文件源码
def __mul__(self, mult):
        """Multiply each point in the cloud by a scalar.

        Parameters
        ----------
        mult : float
            The number by which to multiply the PointCloud.

        Returns
        -------
        :obj:`PointCloud`
            A PointCloud created by the multiplication.

        Raises
        ------
        ValueError
            If mult is not a scalar value.
        """
        if isinstance(mult, numbers.Number):
            return PointCloud(mult * self._data, self._frame)
        raise ValueError('Type %s not supported. Only scalar multiplication is supported' %(type(mult)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号