File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -163,13 +163,19 @@ class ERA5SampledDataset(io.Dataset):
163163 weight_dict (Optional[Dict[str, float]]): Weight dictionary. Defaults to None.
164164 transforms (Optional[vision.Compose]): Compose object contains sample wise
165165 transform(s). Defaults to None.
166+
166167 Examples:
167168 >>> import ppsci
168169 >>> dataset = ppsci.data.dataset.ERA5SampledDataset(
169170 ... "file_path": "/path/to/ERA5SampledDataset",
170171 ... "input_keys": ("input",),
171172 ... "label_keys": ("output",),
172173 ... ) # doctest: +SKIP
174+ >>> # get the length of the dataset
175+ >>> dataset_size = len(dataset)
176+ >>> # get the first sample of the data
177+ >>> first_sample = dataset[0]
178+ >>> print("First sample:", first_sample)
173179 """
174180
175181 def __init__ (
You can’t perform that action at this time.
0 commit comments