'The product of two expressions.'

@_cast_other
def __mul__(self, other):

    if self.is_constant():
        if ((self.size[0] == other.size[0]) and (self.size[1] != self.size[0]) and isinstance(self, cvxtypes.constant()) and self.is_1D_array):
            self = self.T
        return cvxtypes.mul_expr()(self, other)
    elif other.is_constant():
        if (self.is_scalar() or other.is_scalar()):
            return cvxtypes.mul_expr()(other, self)
        else:
            return cvxtypes.rmul_expr()(self, other)
    elif (self.is_affine() and other.is_affine()):
        warnings.warn('Forming    a    nonconvex    expression    (affine)*(affine).')
        return cvxtypes.affine_prod_expr()(self, other)
    else:
        raise DCPError(('Cannot    multiply    %s    and    %s.' % (self.curvature, other.curvature)))
