>>> import dpdata i>>> import numpy as np >>> data = dpdata.LabeledSystem(".",fmt="cp2k/aimd_output") >>> print('# the data contains %d frames' % len(data)) # the data contains 501 frames >>> index_validation = np.random.choice(500,size=40,replace=False) >>> index_training = list(set(range(501))-set(index_validation)) >>> data_training = data.sub_system(index_training) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/public1/home/sc61116/.conda/envs/sc61116/lib/python3.9/site-packages/dpdata/system.py", line 1193, in sub_system tmp_sys.data['forces'] = self.data['forces'][f_idx].reshape(-1, self.data['forces'].shape[1], 3) ValueError: cannot reshape array of size 0 into shape (0,3)