def to_runs_array(self, solver_names):

        S = len(solver_names)
        N = len(self.run_lists)

        # accumulate the success and failure counts
        successes_NS = numpy.zeros((N, S), numpy.intc)
        failures_NS = numpy.zeros((N, S), numpy.intc)
        solver_names_S = list(solver_names)
        instance_ids = sorted(self.run_lists)

        for (n, instance_id) in enumerate(instance_ids):
            runs = self.run_lists[instance_id]

            for run in runs:
                s = solver_names_S.index(run.solver)

                if run.success:
                    successes_NS[n, s] += 1
                else:
                    failures_NS[n, s] += 1

        R = numpy.max(successes_NS)

        # fill in run durations
        durations_NSR = numpy.ones((N, S, R), numpy.double) * numpy.nan

        successes_NS[...] = 0

        for (n, instance_id) in enumerate(instance_ids):
            runs = self.run_lists[instance_id]

            for run in runs:
                s = solver_names_S.index(run.solver)

                if run.success:
                    r = successes_NS[n, s]

                    durations_NSR[n, s, r] = run.cost

                    successes_NS[n, s] = r + 1

        return (successes_NS, failures_NS, durations_NSR)
Read string
dataset/ETHPy150Open borg-project/borg/borg/storage.py/RunData.to_runs_array--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/io/ctf/res4.py/_read_string