Datasets:
nick-leland
commited on
Commit
•
514f7ea
1
Parent(s):
5b8cefb
Update README.md
Browse files
README.md
CHANGED
@@ -91,12 +91,19 @@ Load the dataset:
|
|
91 |
```python
|
92 |
from datasets import load_dataset
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|