nick-leland commited on
Commit
514f7ea
1 Parent(s): 5b8cefb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -6
README.md CHANGED
@@ -91,12 +91,19 @@ Load the dataset:
91
  ```python
92
  from datasets import load_dataset
93
 
94
- dataset = load_dataset("nicholasleland/heat1d-pde-dataset")
95
-
96
- # Access the data
97
- initial_states = dataset['train']['initial_states']
98
- final_states = dataset['train']['final_states']
99
- parameters = dataset['train']['parameters']
 
 
 
 
 
 
 
100
  ```
101
 
102
  ### Dataset Creator
 
91
  ```python
92
  from datasets import load_dataset
93
 
94
+ # Download files locally
95
+ dataset = load_dataset("nick-leland/heat1d-pde-dataset", download_mode="force_redownload")
96
+
97
+ # Read the initial structure (h5py files)
98
+ df = dataset['train'].data.to_pandas()
99
+ file_path = df['image'][0]['path']
100
+ data = h5py.File(file_path, 'r')
101
+
102
+ # Access data
103
+ initial_states = data['initial_states'][:]
104
+ final_states = data['final_states'][:]
105
+ parameters = data['parameters'][:]
106
+ elapsed_times = data['elapsed_times'][:]
107
  ```
108
 
109
  ### Dataset Creator