def __mul__(self, mult):
"""Multiply the point by a scalar.
Parameters
----------
mult : float
The number by which to multiply the Point.
Returns
-------
:obj:`Point3D`
A 3D point created by the multiplication.
Raises
------
ValueError
If mult is not a scalar value.
"""
if isinstance(mult, numbers.Number):
return Point(mult * self._data, self._frame)
raise ValueError('Type %s not supported. Only scalar multiplication is supported' %(type(mult)))
评论列表
文章目录