def __mul__()

in clearbox/features.py [0:0]


  def __mul__(self, other: Node | float) -> Node:
    """Multiply two nodes together.

    Syntactic sugar for `Mul([self, other])`. This method allows you to write:
    ```
    F.Signal("signal_1") * 2.0
    F.Signal("signal_1") * F.Signal("signal_2")
    ```

    Args:
      other: Another node or a float value to multiply to `self`.

    Returns:
      A new `Mul` node.
    """
    if isinstance(other, float) or isinstance(other, int):
      other = Constant(other)
    return Mul([self, other])