Skip to content

Commit ea18392

Browse files
committed
Document the test
1 parent e67c6ab commit ea18392

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/python/unittest/API/APITest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,6 +2247,15 @@ def testScalarHdf5Fields(self):
22472247
except ImportError:
22482248
return
22492249

2250+
# While the openPMD-api (currently) does not create scalar HDF5
2251+
# datasets, we should at least try reading and modifying them in files
2252+
# that were created elsewhere. Scalar here refers to a dataset without
2253+
# dimension. Interacting with them in the openPMD-api is possible by
2254+
# specifying a single element, i.e. offset=[0], extent=[1].
2255+
# For testing this, create a dataset, then use h5py to create a scalar
2256+
# dataset in the file. Then, open first for reading, then for
2257+
# modifying.
2258+
22502259
file = "../samples/scalar_hdf5.h5"
22512260
series_write = io.Series(file, io.Access.create)
22522261
E_x = series_write.write_iterations()[0].meshes["E"]["x"]

0 commit comments

Comments
 (0)