Helper for sum_sections
518720
def sum_lower_sections(secs,start,level)
     i=start
     sum = 0
     while (i < secs.length && secs[i][:level] > level)
       sum += secs[i][:words]
       i += 1
     end
     [sum,i]
   end
761636
def tablify(*args):
    
    """
    table = []
    args = [listify(arg) for arg in args]
    for row in zip(*args):
        r = []
        for x in row:
            r += listify(x)
        table += [r]
    return table
    return [sum([listify(el) for el in row]) for row in zip(*args)]
348541
def sum_coefs(self):
        """"""
        return numpy.sum(self.ar_coefs) + numpy.sum(self.ma_coefs)
30044
def _ss_tot(self):
        """"""
        return np.sum(
            np.square(self.ywins - np.expand_dims(self._ybar, axis=-1)), axis=1
        )
955051
def update_subtotals(self, current, sub_key):
        

        if not self.sub_counts.get(sub_key):
            self.sub_counts[sub_key] = {}
        for item in current:
            try:
                self.sub_counts[sub_key][item] += 1
            except KeyError:
                self.sub_counts[sub_key][item] = 1
850452
def summarize_ranges(array):
    
    res = []
    if len(array) == 1:
        return [str(array[0])]
    i = 0
    while i < len(array):
        num = array[i]
        while i + 1 < len(array) and array[i + 1] - array[i] == 1:
            i += 1
        if array[i] != num:
            res.append((num, array[i]))
        else:
            res.append((num, num))
        i += 1
    return res
908635
def sum(self):
        
        return GroupedDataFrameWeld(
            grizzly_impl.groupby_sum(
                self.columns,
                self.column_types,
                self.grouping_columns,
                self.grouping_column_types
            ),
            self.grouping_column_names,
            self.column_names,
            self.grouping_column_types,
            self.column_types
        )
90828
def flatten_tree(test, enumerator, exp):
  
  return sum((flatten_tree(test, enumerator, subx) for subx in enumerator(exp)), []) if test(exp) else [exp]
190845
def overall( self, node ):
        """"""
        return sum( [self.value(value,node) for value in self.children(node)] )
1261144
def sum(self, default=None):
        
        return numpy.asscalar(numpy.sum(self.values)) if self.values else default
815068
def sum(self, values):
        
        values = sorted(values)
        try:
            return (values[-1] - values[0]).total_seconds()
        except IndexError, TypeError:
            return 0
474544
function sum(transform) {
  let sum = 0;
  let seq = typeof transform === 'function' ? this.select(transform) : this;

  for (let item of seq) {
    sum += Number.parseFloat(item);
  }

  return sum;
}
1244548
def slicesum(self, start, stop=None, axis=0):
        """"""
        return self.slice(start, stop, axis).sum(axis)
38337
def sum(self, callback=None):
        
        if callback is None:
            return sum(self.items)

        callback = self._value_retriever(callback)

        return self.reduce(lambda result, item: (result or 0) + callback(item))
966894
def translate_section(data):
    
    sect_str = ""
    elements = data.get("Elements", [])
    for elem in elements:
            print("    Translating " + elem["Type"])
            sect_str += translate_map[elem["Type"]](elem)
    return sect_str
971866
def assoc(cls, ops, kwargs):
    
    expanded = [(o,) if not isinstance(o, cls) else o.operands for o in ops]
    return sum(expanded, ()), kwargs
696975
function flatten( sections ) {
	var out,
		key,
		i;

	out = {};
	for ( i = 0; i < sections.length; i++ ) {
		key = 'section:' + sections[ i ].replace( /\./, ':' );
		out[ key ] = true;
	}
	return out;
}