Ejemplo n.º 1
0
    def next(self, states, **runopts):
        if len(states) < 1:
            raise ValueError("no input states")

        samples = vstack_samplesets(*[s.samples for s in states])

        if runopts.pop('aggregate', self.aggregate):
            samples = samples.aggregate()

        return states.first.updated(samples=samples)
Ejemplo n.º 2
0
    def next(self, states, **runopts):
        if len(states) < 1:
            raise ValueError("no input states")

        samples = vstack_samplesets(*[s.samples for s in states])

        logger.debug("{name} merging {n} input states into an output state "
                     "with a sample set of size {k}".format(name=self.name,
                                                            n=len(states),
                                                            k=len(samples)))

        if runopts.pop('aggregate', self.aggregate):
            samples = samples.aggregate()
            logger.debug(
                "{name} output samples aggregated".format(name=self.name))

        return states.first.updated(samples=samples)
Ejemplo n.º 3
0
 def vstack(self, *others):
     return vstack_samplesets(self, *others)