Esempio n. 1
0
    def add_empty_to_cache(self, idx, sample_idxs, all_samples):
        if idx not in self.cache:
            obj = SampleSet(
                    samples=[all_samples[sample_idx.tolist()] for sample_idx in sample_idxs],
                    movepath=None
                )
            obj.idx[self.storage] = idx
            obj._origin = self.storage

            del obj.movepath

            self.cache[idx] = obj