Sum all the CSD contributions from every layer.
180183
def calc_csd(self):
        

        CSDarray = np.array([])
        CSDdict = {}

        i = 0
        for y in self.y:
            fil = os.path.join(self.populations_path,
                               self.output_file.format(y, 'CSD.h5'))

            f = h5py.File(fil)

            if i == 0:
                CSDarray = np.zeros((len(self.y),
                                    f['data'].shape[0], f['data'].shape[1]))

            #fill in
            CSDarray[i, ] = f['data'].value

            CSDdict.update({y : f['data'].value})

            f.close()

            i += 1

        return CSDdict,  CSDarray.sum(axis=0)
852039
def calculate_columns(self):
        """"""

        self.cols = int(math.ceil(len(self.elements) / float(self.rows)))
1047624
public function all()
    {
        $colors = [];

        foreach ($this->colors as $color => $code) {
            $colors['background_' . $color] = $code + self::ADD;
        }

        return $colors;
    }
466843
def complete_sum(self):
        
        node = self.node.complete_sum()
        if node is self.node:
            return self
        else:
            return _expr(node)
898410
def all(self, **kwargs):
        
        if self._is_transposed:
            # Pandas ignores on axis=1
            kwargs["bool_only"] = False
            kwargs["axis"] = kwargs.get("axis", 0) ^ 1
            return self.transpose().all(**kwargs)
        return self._process_all_any(lambda df, **kwargs: df.all(**kwargs), **kwargs)
821837
def accumulate(iterable):
  "  "
  iterator = iter(iterable)
  sum_data = next(iterator)
  yield sum_data
  for el in iterator:
    sum_data += el
    yield sum_data
1148058
def _se_all(self):
        """"""
        err = np.expand_dims(self._ms_err, axis=1)
        t1 = np.diagonal(
            np.linalg.inv(np.matmul(self.xwins.swapaxes(1, 2), self.xwins)),
            axis1=1,
            axis2=2,
        )
        return np.squeeze(np.sqrt(t1 * err))
1261581
def all(self, data={}, **kwargs):
        "
        return super(Refund, self).all(data, **kwargs)
692987
def dot(self, w):
        """"""

        return sum([x * y for x, y in zip(self, w)])
1341378
def totals(iter, keyfunc, sumfunc):
    
    data = sorted(iter, key=keyfunc)
    res = {}

    for k, group in groupby(data, keyfunc):
        res[k] = sum([sumfunc(entry) for entry in group])

    return res
1089622
def sum_over_energy(self):
        
        # Note that the array is using the opposite convention from WCS
        # so we sum over axis 0 in the array, but drop axis 2 in the WCS object
        return Map(np.sum(self.counts, axis=0), self.wcs.dropaxis(2))
419283
def total_coverage(self):
        ''''''
        if 'COV' in self.FORMAT:
            return sum([int(x) for x in self.FORMAT['COV'].split(',')])
        else:
            return None
553348
def share(self):
        
        tot = sum(self.total.values())
        return { k: v/float(tot) for k,v in self.total.items() }
1271403
def sumad(array):
    
    n = ctypes.c_int(len(array))
    array = stypes.toDoubleVector(array)
    return libspice.sumad_c(array, n)
945239
def sum(self, axis=None, keepdims=False):
        
        return self.numpy().sum(axis=axis, keepdims=keepdims)
1162666
def transfer_all(cls, field_mappings, sources, destination_factory=None):
    """"""
    for index, source in enumerate(sources):
      try:
        yield cls.transfer(field_mappings, source, destination_factory or (lambda x: x))
      except Exception as ex:
        raise Exception("Error with source #{0}: {1}".format(index, ex)) from ex
8761
public void accumulate(Object workingMemoryContext,
                           Object context,
                           Tuple leftTuple,
                           InternalFactHandle handle,
                           Declaration[] declarations,
                           Declaration[] innerDeclarations,
                           WorkingMemory workingMemory) throws Exception {
        Object value = this.unwrapHandle ? ((LeftTuple) handle.getObject()).getFactHandle().getObject() : handle.getObject();
        ((CollectContext) context).result.add( value );
    }