def to_bins_array(self, solver_names, B, cutoff = None):

        if cutoff is None:
            cutoff = self.get_common_budget()

        S = len(solver_names)
        N = len(self.run_lists)
        C = B + 1

        solver_name_index = list(solver_names)
        outcomes_NSC = numpy.zeros((N, S, C), numpy.intc)
        interval = cutoff / B

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

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

                if run.success and run.cost < cutoff:
                    b = int(run.cost / interval)

                    outcomes_NSC[n, s, b] += 1
                else:
                    outcomes_NSC[n, s, B] += 1

        return outcomes_NSC
Return discretized run duration counts.
dataset/ETHPy150Open borg-project/borg/borg/storage.py/RunData.to_bins_array