Download scripts/fake_data.py from OneScience-Group/FuXi-Weather: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/OneScience-Group/FuXi-Weather/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/FuXi-Weather/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/FuXi-Weather/resolve/main/scripts/fake_data.py
462 Bytes
| from pathlib import Path | |
| import sys,numpy as np | |
| R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.fuxi_weather import * | |
| c=cfg(R);b=[];o=[];m=[];t=[] | |
| for i in range(8):a,z,q=sample(i);b.append(a);o.append(z);m.append(q);t.append(sample(i,1)[0]) | |
| p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez_compressed(p,background=b,observation=o,mask=m,target=t,logical_shape=[20,721,1440],is_complete_global=False);print(p) | |