Skip to content

Commit

Permalink
【PPSCI Doc No.9】 ppsci.data.dataset.VtuDataset (#791)
Browse files Browse the repository at this point in the history
* Add docx

* Apply suggestions from code review

* Apply suggestions from code review
  • Loading branch information
Liyulingyue authored Mar 1, 2024
1 parent e3f71a9 commit f2d4c91
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ppsci/data/dataset/vtu_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ class VtuDataset(io.Dataset):
labels (Optional[Dict[str, float]]): Temporary variable for [load_vtk_with_time_file].
transforms (vision.Compose, optional): Compose object contains sample wise.
transform(s).
Examples:
>>> from ppsci.dataset import VtuDataset
>>> dataset = VtuDataset(file_path='example.vtu') # doctest: +SKIP
>>> # get the length of the dataset
>>> dataset_size = len(dataset) # doctest: +SKIP
>>> # get the first sample of the data
>>> first_sample = dataset[0] # doctest: +SKIP
>>> print("First sample:", first_sample)
"""

# Whether support batch indexing for speeding up fetching process.
Expand Down

0 comments on commit f2d4c91

Please sign in to comment.