parameters: (self)
docstring: Multiplication is convex (affine) in its arguments only if one of
             the arguments is constant.
docstring_summary: Multiplication is convex (affine) in its arguments only if one of
             the arguments is constant.
docstring_tokens: Multiplication is convex ( affine ) in its arguments only if one of the arguments is constant .
function: def is_atom_convex(self) -> bool:
          """Multiplication is convex (affine) in its arguments only if one of
             the arguments is constant.
          """
          if u.scopes.dpp_scope_active():
              # This branch applies curvature rules for DPP.
              #
              # Because a DPP scope is active, parameters will be
              # treated as affine (like variables, not constants) by curvature
              # analysis methods.
              #
              # Like under DCP, a product x * y is convex if x or y is constant.
              # If neither x nor y is constant, then the product is DPP
              # if one of the expressions is affine in its parameters and the
              # other is parameter-free.
              x = self.args[0]
              y = self.args[1]
              return ((x.is_constant() or y.is_constant()) or
                      (is_param_affine(x) and is_param_free(y)) or
                      (is_param_affine(y) and is_param_free(x)))
          else:
              return self.args[0].is_constant() or self.args[1].is_constant()
function_tokens: def is_atom_convex ( self ) -> bool : if u . scopes . dpp_scope_active ( ) : # This branch applies curvature rules for DPP. # # Because a DPP scope is active, parameters will be # treated as affine (like variables, not constants) by curvature # analysis methods. # # Like under DCP, a product x * y is convex if x or y is constant. # If neither x nor y is constant, then the product is DPP # if one of the expressions is affine in its parameters and the # other is parameter-free. x = self . args [ 0 ] y = self . args [ 1 ] return ( ( x . is_constant ( ) or y . is_constant ( ) ) or ( is_param_affine ( x ) and is_param_free ( y ) ) or ( is_param_affine ( y ) and is_param_free ( x ) ) ) else : return self . args [ 0 ] . is_constant ( ) or self . args [ 1 ] . is_constant ( )