Oct-16-2020, 11:21 PM
In my script, I create several datasets manually:
1) Automate the above statements to execute in a loop fashion and create any desired (N) datasets
2) Then I also use
import tables dset1 = f.create_earray(f.root, "dataset1", atom=tables.Float64Atom(), shape=(0, 2)) dset2 = f.create_earray(f.root, "dataset2", atom=tables.Float64Atom(), shape=(0, 2)) dset3 = f.create_earray(f.root, "dataset3", atom=tables.Float64Atom(), shape=(0, 2)) ...I want to achieve two things:
1) Automate the above statements to execute in a loop fashion and create any desired (N) datasets
2) Then I also use
.append
method sequentially (as given below) which I also want to automate:dset1.append(np_array1) dset2.append(np_array2) dset3.append(np_array3) ...Will appreciate any assistance?