Merge vectors from two DataFrames. In case of name collision,
 the vectors names are changed to x_1, x_2 ....

 @return {Daru::DataFrame}
323068
def merge other_df # rubocop:disable Metrics/AbcSize
      unless nrows == other_df.nrows
        raise ArgumentError,
          "Number of rows must be equal in this: #{nrows} and other: #{other_df.nrows}"
      end

      new_fields = (@vectors.to_a + other_df.vectors.to_a)
      new_fields = ArrayHelper.recode_repeated(new_fields)
      DataFrame.new({}, order: new_fields).tap do |df_new|
        (0...nrows).each do |i|
          df_new.add_row row[i].to_a + other_df.row[i].to_a
        end
        df_new.index = @index if @index == other_df.index
        df_new.update
      end
    end
209106
function mergeChanges(filename, extlang, lines, objects) {

    if (objects.length > 0) {

      console.log(filename, extlang);

      var obj = new DataObject({name: filename, extlang: extlang});
      obj.lines = lines;

      for (var i in objects) {
        var o = objects[i];
        var data = lines.slice(o.lines[0], o.lines[1]).join('\n');
        obj.set(o, {hash:md5(data), lines: o.lines});
      }

      storage.set(obj);
    }
  }
1263790
function merge(objectA, objectB) {
	for (var attrName in objectB) {
		if (objectB.hasOwnProperty(attrName)) {
			if (objectA.hasOwnProperty(attrName) && objectA[attrName] instanceof Object && objectB.hasOwnProperty(attrName) && objectB[attrName] instanceof Object) {
				objectA[attrName] = merge(objectA[attrName], objectB[attrName]);
			}
			else {
				objectA[attrName] = objectB[attrName];
			}
		}
	}
	return objectA;
}
271346
def merge(self, frame):
        
        for column_name, _ in self._column_stats.items():
            data_arr = frame[[column_name]].values
            count, min_max_tup, mean, _, _, _ = \
                scistats.describe(data_arr)
            stats_counter = StatCounter()
            stats_counter.n = count
            stats_counter.mu = mean
            stats_counter.m2 = np.sum((data_arr - mean) ** 2)
            stats_counter.minValue, stats_counter.maxValue = min_max_tup
            self._column_stats[column_name] = self._column_stats[
                column_name].mergeStats(stats_counter)
        return self
361988
def multi_new(rhs)
      if(rhs.kind_of?(Vector3))
        ans = self.multi_inner(rhs.to_column_vector)
      return Vector3.new(ans[0,0], ans[1,0], ans[2,0])
      end
      multi_inner(rhs)
    end
368891
function _runInDataframes (viewportExpressions, renderLayer, dataframes) {
    const processedFeaturesIDs = new Set(); // same feature can belong to multiple dataframes
    const viz = renderLayer.viz;

    const inViewportFeaturesIDs = new Set();
    dataframes.forEach(dataframe => {
        _runInDataframe(viz, viewportExpressions, dataframe, processedFeaturesIDs, inViewportFeaturesIDs);
    });
    return inViewportFeaturesIDs;
}
155896
function merge() {
	return Array.from(arguments)
		.reduce((result, current) => {
			Array.from(current)
				.forEach((value, index) => {
					result[index] = result[index] && typeof result[index] !== 'boolean' ? result[index] : value;
				});

			return result;
		}, []);
}
714826
function create2x2(a, b, c, d){
    if (undef(a)) throw new Error("At least one argument must be provided.");

    if (undef(b)){
        // Everything = a
        b = a;
        c = a;
        d = a;
    }
    else{
        // we have a and b
        if(undef(c)){
            c = a;
            d = b;
        }
        else{
            if(undef(d)) throw new Error("Argument 'd' must be provided if 'c' is.");
        }
    }

    return new Vector([[a, b],[c, d]]);
}
788588
function mergeObject (a, b) {
  var keys = Object.keys(b)
  var k;

  for (var i = 0; i < keys.length; i++) {
    k = keys[i];

    if ('object' !== type(b[k]) && 'array' !== type(b[k])) {
      // TODO: better deref handling of other types
      a[k] = b[k];
    } else {
      a[k] = a.hasOwnProperty(k)
        ? merge(a[k], b[k])
        : merge('array' === type(b[k]) ? [] : {}, b[k]);
    }
  }

  return a;
}
223468
def transform_dataframe(self, dataframe):
        
        dataframe.columns.name = ""

        for i in range(len(self.get_header_fields())):
            dataframe = dataframe.unstack()

        # Remove blank rows / columns
        dataframe = dataframe.dropna(
            axis=0, how='all'
        ).dropna(
            axis=1, how='all'
        )
        return dataframe
231165
function mergeArrays(array1, array2) {
  return array2.length >= array1.length ? [...array2] : [...array2, ...array1.slice(array2.length)];
}
1334555
def merge_dicts(d1, d2):
    """"""
    merged = copy.deepcopy(d1)
    deep_update(merged, d2, True, [])
    return merged
902778
def *(par1)
      out = Vector.new(self)
      if par1.is_a?Numeric
        out.x *= par1
        out.y *= par1
        if out.z != nil
          out.z *= par1
        end
      elsif par1.is_a?Matrix
        return (self.to_matrix * par1).to_vector
      elsif par1.is_a?Vector
        ary1 = [self.x, self.y]
        if out.z != nil
          ary1 << out.z
        end

        ary2 = [par1.x, par1.y]
        if out.z != nil
          ary2 << par1.z
        end

        aryr = Matrix.mult_array(ary1, ary2)
        out.x = aryr[0]
        out.y = aryr[1]
        if aryr[2] != nil
          out.z = aryr[2]
        end
      else
        Error.call "Unable to add '#{par1} to this vector", Error::ERR_HIGH
      end
      return out
    end
529662
function mergeArrays (a, b) {
    // if target is array then add b to array otherwise return undefined
    // so normal _.merge will be performed
    return Array.isArray(a) ? a.concat(b) : undefined
}
177857
Frame merge(Frame l, Frame r, int[] byLeft, int[] byRite) {
      boolean allLeft = true;
      // See comments in the original implementation in AstMerge.java
      new GCForceTask().doAllNodes();

      int ncols = byLeft.length;
      l.moveFirst(byLeft);
      r.moveFirst(byRite);

      int[][] id_maps = new int[ncols][];
      for (int i = 0; i < ncols; i++) {
        Vec lv = l.vec(i);
        Vec rv = r.vec(i);

        if (lv.isCategorical()) {
          assert rv.isCategorical();
          id_maps[i] = CategoricalWrappedVec.computeMap(lv.domain(), rv.domain());
        }
      }
      int cols[] = new int[ncols];
      for (int i = 0; i < ncols; i++) cols[i] = i;
      return register(Merge.merge(l, r, cols, cols, allLeft, id_maps));
    }
956601
def merge(d1, d2):
    
    if d1['formula_id2latex'] is None:
        formula_id2latex = {}
    else:
        formula_id2latex = d1['formula_id2latex'].copy()
    formula_id2latex.update(d2['formula_id2latex'])
    handwriting_datasets = d1['handwriting_datasets']
    for dataset in d2['handwriting_datasets']:
        handwriting_datasets.append(dataset)
    return {'formula_id2latex': formula_id2latex,
            'handwriting_datasets': handwriting_datasets}
1059941
def only_numerics opts={}
      cln = opts[:clone] == false ? false : true
      arry = numeric_vectors.map { |v| self[v] }

      order = Index.new(numeric_vectors)
      Daru::DataFrame.new(arry, clone: cln, order: order, index: @index)
    end