diff --git a/miplearn/features/sample.py b/miplearn/features/sample.py index 11f37b4..4f33edd 100644 --- a/miplearn/features/sample.py +++ b/miplearn/features/sample.py @@ -312,6 +312,7 @@ class Hdf5Sample(Sample): def _pad(veclist: VectorList) -> Tuple[VectorList, List[int]]: + veclist = deepcopy(veclist) lens = [len(v) if v is not None else -1 for v in veclist] maxlen = max(lens) diff --git a/tests/features/test_extractor.py b/tests/features/test_extractor.py index 9edb496..9612211 100644 --- a/tests/features/test_extractor.py +++ b/tests/features/test_extractor.py @@ -192,7 +192,7 @@ if __name__ == "__main__": extractor = FeaturesExtractor(with_lhs=False) sample = Hdf5Sample("tmp/prof.h5", mode="w") - def run(): + def run() -> None: extractor.extract_after_load_features(instance, solver, sample) extractor.extract_after_lp_features(solver, sample)