code: def weld_replace(array, weld_type, this, to):
      
      if not isinstance(this, str):
          this = to_weld_literal(this, weld_type)
      to = to_weld_literal(to, weld_type)
  
      obj_id, weld_obj = create_weld_object(array)
  
      weld_template = """map({array},
      |e: {type}|
          if(e == {this},
              {to},
              e
          )    
  )"""
  
      weld_obj.weld_code = weld_template.format(array=obj_id,
                                                type=weld_type,
                                                this=this,
                                                to=to)
  
      return weld_obj
docs: Replaces 'this' values to 'to' value.
  
      Parameters
      ----------
      array : numpy.ndarray or WeldObject
          Input array.
      weld_type : WeldType
          Type of the data in the array.
      this : {int, float, str, bool, bytes}
          Scalar to replace.
      to : {int, float, str, bool, bytes}
          Scalar to replace with.
  
      Returns
      -------
      WeldObject
          Representation of this computation.