def __mul__(self, other): if isinstance(other, Number): return Vector(API.mapMultiply(self._vector, other)) else: return Vector(API.dotProduct(self._vector, other._vector))