sasoptpy.Expression.mult

Expression.mult(self, other)[source]

Multiplies the Expression by a scalar value

Parameters
otherExpression or int

Second expression to be multiplied

Returns
rExpression

A new Expression that represents the multiplication

Notes

  • This method is mainly for internal use.

  • It is preferable to use regular Python operation, instead of calling this method:

    >>> e = 3 * (x-y)
    >>> f = 3
    >>> g = e*f
    >>> print(g)
    9 * x - 9 * y