322 KB
/srv/reproducible-results/rbuild-debian/r-b-build.hjjUanAL/b1/python-xarray_2025.01.2-1_armhf.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.hjjUanAL/b2/python-xarray_2025.01.2-1_armhf.changes
309 B
Files
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
  
1 ·6acfd92606f816f2be70ba77c1cdb202·2007636·doc·optional·python-xarray-doc_2025.01.2-1_all.deb1 ·3da3d067e964add05d457d53b848d7b3·2008620·doc·optional·python-xarray-doc_2025.01.2-1_all.deb
2 ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb2 ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb
322 KB
python-xarray-doc_2025.01.2-1_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary1 -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary
2 -rw-r--r--···0········0········0·····6172·2025-02-02·11:36:57.000000·control.tar.xz2 -rw-r--r--···0········0········0·····6168·2025-02-02·11:36:57.000000·control.tar.xz
3 -rw-r--r--···0········0········0··2001272·2025-02-02·11:36:57.000000·data.tar.xz3 -rw-r--r--···0········0········0··2002260·2025-02-02·11:36:57.000000·data.tar.xz
621 B
control.tar.xz
593 B
control.tar
523 B
./control
    
Offset 1, 13 lines modifiedOffset 1, 13 lines modified
1 Package:·python-xarray-doc1 Package:·python-xarray-doc
2 Source:·python-xarray2 Source:·python-xarray
3 Version:·2025.01.2-13 Version:·2025.01.2-1
4 Architecture:·all4 Architecture:·all
5 Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org>5 Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org>
6 Installed-Size:·79826 Installed-Size:·7987
7 Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs7 Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs
8 Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-4)8 Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-4)
9 Section:·doc9 Section:·doc
10 Priority:·optional10 Priority:·optional
11 Multi-Arch:·foreign11 Multi-Arch:·foreign
12 Homepage:·https://xarray.pydata.org/12 Homepage:·https://xarray.pydata.org/
13 Description:·documentation·for·xarray13 Description:·documentation·for·xarray
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
321 KB
data.tar.xz
321 KB
data.tar
14.7 KB
file list
    
Offset 152, 31 lines modifiedOffset 152, 31 lines modified
152 -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html152 -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html
153 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html153 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html
154 -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html154 -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html
155 -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html155 -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html
156 -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html156 -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html
157 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/157 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/
158 -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html158 -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html
159 -rw-r--r--···0·root·········(0)·root·········(0)·····1834·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz159 -rw-r--r--···0·root·········(0)·root·········(0)·····1844·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
160 -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html160 -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html
161 -rw-r--r--···0·root·········(0)·root·········(0)····23729·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz161 -rw-r--r--···0·root·········(0)·root·········(0)····23745·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
162 -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html162 -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html
163 -rw-r--r--···0·root·········(0)·root·········(0)·····8797·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz163 -rw-r--r--···0·root·········(0)·root·········(0)·····8814·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
164 -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html164 -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html
165 -rw-r--r--···0·root·········(0)·root·········(0)····20992·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz165 -rw-r--r--···0·root·········(0)·root·········(0)····21000·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
166 -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html166 -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html
167 -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb167 -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb
168 -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html168 -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html
169 -rw-r--r--···0·root·········(0)·root·········(0)·····3221·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz169 -rw-r--r--···0·root·········(0)·root·········(0)·····3224·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
170 -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html170 -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html
171 -rw-r--r--···0·root·········(0)·root·········(0)·····3236·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz171 -rw-r--r--···0·root·········(0)·root·········(0)·····3248·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
172 -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html172 -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html
173 -rw-r--r--···0·root·········(0)·root·········(0)·····2857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz173 -rw-r--r--···0·root·········(0)·root·········(0)·····2870·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
174 -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html174 -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html
175 -rw-r--r--···0·root·········(0)·root·········(0)·····3566·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz175 -rw-r--r--···0·root·········(0)·root·········(0)·····3592·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
176 -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html176 -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html
177 -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html177 -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html
178 -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html178 -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html
179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/
180 -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html180 -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html
181 -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html181 -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html
182 -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html182 -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html
Offset 191, 50 lines modifiedOffset 191, 50 lines modified
191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/
192 -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html192 -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html
193 -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html193 -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html
194 -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html194 -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html
195 -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html195 -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html
196 -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html196 -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html
197 -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html197 -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html
198 -rw-r--r--···0·root·········(0)·root·········(0)····60255·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/internal-design.html198 -rw-r--r--···0·root·········(0)·root·········(0)····60257·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/internal-design.html
199 -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html199 -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html
200 -rw-r--r--···0·root·········(0)·root·········(0)····27071·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html200 -rw-r--r--···0·root·········(0)·root·········(0)····27072·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html
201 -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html201 -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html
202 -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html202 -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html
203 -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv203 -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv
204 -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html204 -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html
205 -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html205 -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html
206 -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html206 -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html
207 -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html207 -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html
208 -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html208 -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html
209 -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html209 -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html
210 -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html210 -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html
211 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html211 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html
212 -rw-r--r--···0·root·········(0)·root·········(0)···240442·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js212 -rw-r--r--···0·root·········(0)·root·········(0)···241340·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js
213 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html213 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html
214 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html214 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html
215 -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html215 -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html
216 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/216 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/
217 -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html217 -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html
218 -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html218 -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html
219 -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html219 -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html
220 -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html220 -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html
221 -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html221 -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html
222 -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html222 -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html
223 -rw-r--r--···0·root·········(0)·root·········(0)···120196·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html223 -rw-r--r--···0·root·········(0)·root·········(0)···120197·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html
224 -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html224 -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html
225 -rw-r--r--···0·root·········(0)·root·········(0)···140255·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html225 -rw-r--r--···0·root·········(0)·root·········(0)···140258·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html
226 -rw-r--r--···0·root·········(0)·root·········(0)····68701·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html226 -rw-r--r--···0·root·········(0)·root·········(0)····68702·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html
227 -rw-r--r--···0·root·········(0)·root·········(0)···144433·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html227 -rw-r--r--···0·root·········(0)·root·········(0)···144435·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html
228 -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html228 -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html
229 -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html229 -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html
230 -rw-r--r--···0·root·········(0)·root·········(0)···136129·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html230 -rw-r--r--···0·root·········(0)·root·········(0)···136131·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html
231 -rw-r--r--···0·root·········(0)·root·········(0)····62899·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html231 -rw-r--r--···0·root·········(0)·root·········(0)····62900·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html
232 -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html232 -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html
233 -rw-r--r--···0·root·········(0)·root·········(0)····47296·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html233 -rw-r--r--···0·root·········(0)·root·········(0)····51467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
234 -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html234 -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html
235 -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html235 -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html
236 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html236 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html
237 -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html237 -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html
238 -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html238 -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html
239 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/239 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/
240 -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc240 -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc
5.67 KB
./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
5.53 KB
ERA5-GRIB-example.ipynb
5.48 KB
Pretty-printed
Similarity: 0.9985795454545454% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:33:27.146211Z', " "'iopub.status.busy': '2025-02-05T04:33:27.144581Z', 'iopub.status.idle': " "'2025-02-05T04:33:28.540453Z', 'shell.execute_reply': " "'2025-02-05T04:33:28.536280Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:33:28.865602Z', 'iopub.status.busy': " "'2025-02-05T04:33:28.864043Z', 'iopub.status.idle': '2025-02-05T04:33:2 […]
    
Offset 15, 18 lines modifiedOffset 15, 18 lines modified
15 ············]15 ············]
16 ········},16 ········},
17 ········{17 ········{
18 ············"cell_type":·"code",18 ············"cell_type":·"code",
19 ············"execution_count":·1,19 ············"execution_count":·1,
20 ············"metadata":·{20 ············"metadata":·{
21 ················"execution":·{21 ················"execution":·{
22 ····················"iopub.execute_input":·"2025-02-05T04:03:08.210982Z",22 ····················"iopub.execute_input":·"2025-02-05T04:33:27.146211Z",
23 ····················"iopub.status.busy":·"2025-02-05T04:03:08.210274Z",23 ····················"iopub.status.busy":·"2025-02-05T04:33:27.144581Z",
24 ····················"iopub.status.idle":·"2025-02-05T04:03:08.859189Z",24 ····················"iopub.status.idle":·"2025-02-05T04:33:28.540453Z",
25 ····················"shell.execute_reply":·"2025-02-05T04:03:08.857058Z"25 ····················"shell.execute_reply":·"2025-02-05T04:33:28.536280Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"ename":·"ModuleNotFoundError",30 ····················"ename":·"ModuleNotFoundError",
31 ····················"evalue":·"No·module·named·'xarray'",31 ····················"evalue":·"No·module·named·'xarray'",
32 ····················"output_type":·"error",32 ····················"output_type":·"error",
Offset 51, 18 lines modifiedOffset 51, 18 lines modified
51 ············]51 ············]
52 ········},52 ········},
53 ········{53 ········{
54 ············"cell_type":·"code",54 ············"cell_type":·"code",
55 ············"execution_count":·2,55 ············"execution_count":·2,
56 ············"metadata":·{56 ············"metadata":·{
57 ················"execution":·{57 ················"execution":·{
58 ····················"iopub.execute_input":·"2025-02-05T04:03:08.993814Z",58 ····················"iopub.execute_input":·"2025-02-05T04:33:28.865602Z",
59 ····················"iopub.status.busy":·"2025-02-05T04:03:08.993000Z",59 ····················"iopub.status.busy":·"2025-02-05T04:33:28.864043Z",
60 ····················"iopub.status.idle":·"2025-02-05T04:03:09.045040Z",60 ····················"iopub.status.idle":·"2025-02-05T04:33:28.965702Z",
61 ····················"shell.execute_reply":·"2025-02-05T04:03:09.043059Z"61 ····················"shell.execute_reply":·"2025-02-05T04:33:28.961926Z"
62 ················}62 ················}
63 ············},63 ············},
64 ············"outputs":·[64 ············"outputs":·[
65 ················{65 ················{
66 ····················"ename":·"NameError",66 ····················"ename":·"NameError",
67 ····················"evalue":·"name·'xr'·is·not·defined",67 ····················"evalue":·"name·'xr'·is·not·defined",
68 ····················"output_type":·"error",68 ····················"output_type":·"error",
Offset 86, 18 lines modifiedOffset 86, 18 lines modified
86 ············]86 ············]
87 ········},87 ········},
88 ········{88 ········{
89 ············"cell_type":·"code",89 ············"cell_type":·"code",
90 ············"execution_count":·3,90 ············"execution_count":·3,
91 ············"metadata":·{91 ············"metadata":·{
92 ················"execution":·{92 ················"execution":·{
93 ····················"iopub.execute_input":·"2025-02-05T04:03:09.054133Z",93 ····················"iopub.execute_input":·"2025-02-05T04:33:28.979974Z",
94 ····················"iopub.status.busy":·"2025-02-05T04:03:09.053317Z",94 ····················"iopub.status.busy":·"2025-02-05T04:33:28.978458Z",
95 ····················"iopub.status.idle":·"2025-02-05T04:03:09.107173Z",95 ····················"iopub.status.idle":·"2025-02-05T04:33:29.079022Z",
96 ····················"shell.execute_reply":·"2025-02-05T04:03:09.105173Z"96 ····················"shell.execute_reply":·"2025-02-05T04:33:29.075131Z"
97 ················}97 ················}
98 ············},98 ············},
99 ············"outputs":·[99 ············"outputs":·[
100 ················{100 ················{
101 ····················"ename":·"NameError",101 ····················"ename":·"NameError",
102 ····················"evalue":·"name·'ds'·is·not·defined",102 ····················"evalue":·"name·'ds'·is·not·defined",
103 ····················"output_type":·"error",103 ····················"output_type":·"error",
Offset 122, 18 lines modifiedOffset 122, 18 lines modified
122 ············]122 ············]
123 ········},123 ········},
124 ········{124 ········{
125 ············"cell_type":·"code",125 ············"cell_type":·"code",
126 ············"execution_count":·4,126 ············"execution_count":·4,
127 ············"metadata":·{127 ············"metadata":·{
128 ················"execution":·{128 ················"execution":·{
129 ····················"iopub.execute_input":·"2025-02-05T04:03:09.115236Z",129 ····················"iopub.execute_input":·"2025-02-05T04:33:29.093126Z",
130 ····················"iopub.status.busy":·"2025-02-05T04:03:09.114474Z",130 ····················"iopub.status.busy":·"2025-02-05T04:33:29.091632Z",
131 ····················"iopub.status.idle":·"2025-02-05T04:03:09.640424Z",131 ····················"iopub.status.idle":·"2025-02-05T04:33:30.152739Z",
132 ····················"shell.execute_reply":·"2025-02-05T04:03:09.638418Z"132 ····················"shell.execute_reply":·"2025-02-05T04:33:30.148740Z"
133 ················}133 ················}
134 ············},134 ············},
135 ············"outputs":·[135 ············"outputs":·[
136 ················{136 ················{
137 ····················"ename":·"NameError",137 ····················"ename":·"NameError",
138 ····················"evalue":·"name·'plt'·is·not·defined",138 ····················"evalue":·"name·'plt'·is·not·defined",
139 ····················"output_type":·"error",139 ····················"output_type":·"error",
Offset 166, 18 lines modifiedOffset 166, 18 lines modified
166 ············]166 ············]
167 ········},167 ········},
168 ········{168 ········{
169 ············"cell_type":·"code",169 ············"cell_type":·"code",
170 ············"execution_count":·5,170 ············"execution_count":·5,
171 ············"metadata":·{171 ············"metadata":·{
172 ················"execution":·{172 ················"execution":·{
173 ····················"iopub.execute_input":·"2025-02-05T04:03:09.649265Z",173 ····················"iopub.execute_input":·"2025-02-05T04:33:30.166556Z",
174 ····················"iopub.status.busy":·"2025-02-05T04:03:09.648437Z",174 ····················"iopub.status.busy":·"2025-02-05T04:33:30.164977Z",
175 ····················"iopub.status.idle":·"2025-02-05T04:03:09.702914Z",175 ····················"iopub.status.idle":·"2025-02-05T04:33:30.269739Z",
176 ····················"shell.execute_reply":·"2025-02-05T04:03:09.700692Z"176 ····················"shell.execute_reply":·"2025-02-05T04:33:30.265806Z"
177 ················}177 ················}
178 ············},178 ············},
179 ············"outputs":·[179 ············"outputs":·[
180 ················{180 ················{
181 ····················"ename":·"NameError",181 ····················"ename":·"NameError",
182 ····················"evalue":·"name·'ds'·is·not·defined",182 ····················"evalue":·"name·'ds'·is·not·defined",
183 ····················"output_type":·"error",183 ····················"output_type":·"error",
7.62 KB
./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
7.48 KB
ROMS_ocean_model.ipynb
7.44 KB
Pretty-printed
Similarity: 0.9988051470588235% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:33:41.730139Z', " "'iopub.status.busy': '2025-02-05T04:33:41.728569Z', 'iopub.status.idle': " "'2025-02-05T04:33:49.094975Z', 'shell.execute_reply': " "'2025-02-05T04:33:49.090395Z'}}}, 5: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:33:49.113662Z', 'iopub.status.busy': " "'2025-02-05T04:33:49.111940Z', 'iopub.status.idle': '2025-02-05T04:33:4 […]
    
Offset 17, 18 lines modifiedOffset 17, 18 lines modified
17 ············]17 ············]
18 ········},18 ········},
19 ········{19 ········{
20 ············"cell_type":·"code",20 ············"cell_type":·"code",
21 ············"execution_count":·1,21 ············"execution_count":·1,
22 ············"metadata":·{22 ············"metadata":·{
23 ················"execution":·{23 ················"execution":·{
24 ····················"iopub.execute_input":·"2025-02-05T04:03:14.390897Z",24 ····················"iopub.execute_input":·"2025-02-05T04:33:41.730139Z",
25 ····················"iopub.status.busy":·"2025-02-05T04:03:14.390149Z",25 ····················"iopub.status.busy":·"2025-02-05T04:33:41.728569Z",
26 ····················"iopub.status.idle":·"2025-02-05T04:03:17.279500Z",26 ····················"iopub.status.idle":·"2025-02-05T04:33:49.094975Z",
27 ····················"shell.execute_reply":·"2025-02-05T04:03:17.277824Z"27 ····················"shell.execute_reply":·"2025-02-05T04:33:49.090395Z"
28 ················}28 ················}
29 ············},29 ············},
30 ············"outputs":·[30 ············"outputs":·[
31 ················{31 ················{
32 ····················"ename":·"ModuleNotFoundError",32 ····················"ename":·"ModuleNotFoundError",
33 ····················"evalue":·"No·module·named·'xarray'",33 ····················"evalue":·"No·module·named·'xarray'",
34 ····················"output_type":·"error",34 ····················"output_type":·"error",
Offset 87, 18 lines modifiedOffset 87, 18 lines modified
87 ············]87 ············]
88 ········},88 ········},
89 ········{89 ········{
90 ············"cell_type":·"code",90 ············"cell_type":·"code",
91 ············"execution_count":·2,91 ············"execution_count":·2,
92 ············"metadata":·{92 ············"metadata":·{
93 ················"execution":·{93 ················"execution":·{
94 ····················"iopub.execute_input":·"2025-02-05T04:03:17.287120Z",94 ····················"iopub.execute_input":·"2025-02-05T04:33:49.113662Z",
95 ····················"iopub.status.busy":·"2025-02-05T04:03:17.286435Z",95 ····················"iopub.status.busy":·"2025-02-05T04:33:49.111940Z",
96 ····················"iopub.status.idle":·"2025-02-05T04:03:17.332494Z",96 ····················"iopub.status.idle":·"2025-02-05T04:33:49.225063Z",
97 ····················"shell.execute_reply":·"2025-02-05T04:03:17.330857Z"97 ····················"shell.execute_reply":·"2025-02-05T04:33:49.220607Z"
98 ················}98 ················}
99 ············},99 ············},
100 ············"outputs":·[100 ············"outputs":·[
101 ················{101 ················{
102 ····················"ename":·"NameError",102 ····················"ename":·"NameError",
103 ····················"evalue":·"name·'xr'·is·not·defined",103 ····················"evalue":·"name·'xr'·is·not·defined",
104 ····················"output_type":·"error",104 ····················"output_type":·"error",
Offset 137, 18 lines modifiedOffset 137, 18 lines modified
137 ············]137 ············]
138 ········},138 ········},
139 ········{139 ········{
140 ············"cell_type":·"code",140 ············"cell_type":·"code",
141 ············"execution_count":·3,141 ············"execution_count":·3,
142 ············"metadata":·{142 ············"metadata":·{
143 ················"execution":·{143 ················"execution":·{
144 ····················"iopub.execute_input":·"2025-02-05T04:03:17.342756Z",144 ····················"iopub.execute_input":·"2025-02-05T04:33:49.243981Z",
145 ····················"iopub.status.busy":·"2025-02-05T04:03:17.342088Z",145 ····················"iopub.status.busy":·"2025-02-05T04:33:49.241178Z",
146 ····················"iopub.status.idle":·"2025-02-05T04:03:17.398623Z",146 ····················"iopub.status.idle":·"2025-02-05T04:33:49.387469Z",
147 ····················"shell.execute_reply":·"2025-02-05T04:03:17.396895Z"147 ····················"shell.execute_reply":·"2025-02-05T04:33:49.383098Z"
148 ················}148 ················}
149 ············},149 ············},
150 ············"outputs":·[150 ············"outputs":·[
151 ················{151 ················{
152 ····················"ename":·"NameError",152 ····················"ename":·"NameError",
153 ····················"evalue":·"name·'ds'·is·not·defined",153 ····················"evalue":·"name·'ds'·is·not·defined",
154 ····················"output_type":·"error",154 ····················"output_type":·"error",
Offset 182, 18 lines modifiedOffset 182, 18 lines modified
182 ············]182 ············]
183 ········},183 ········},
184 ········{184 ········{
185 ············"cell_type":·"code",185 ············"cell_type":·"code",
186 ············"execution_count":·4,186 ············"execution_count":·4,
187 ············"metadata":·{187 ············"metadata":·{
188 ················"execution":·{188 ················"execution":·{
189 ····················"iopub.execute_input":·"2025-02-05T04:03:17.410621Z",189 ····················"iopub.execute_input":·"2025-02-05T04:33:49.404695Z",
190 ····················"iopub.status.busy":·"2025-02-05T04:03:17.409948Z",190 ····················"iopub.status.busy":·"2025-02-05T04:33:49.403015Z",
191 ····················"iopub.status.idle":·"2025-02-05T04:03:17.454070Z",191 ····················"iopub.status.idle":·"2025-02-05T04:33:49.509976Z",
192 ····················"shell.execute_reply":·"2025-02-05T04:03:17.452247Z"192 ····················"shell.execute_reply":·"2025-02-05T04:33:49.505457Z"
193 ················},193 ················},
194 ················"scrolled":·false194 ················"scrolled":·false
195 ············},195 ············},
196 ············"outputs":·[196 ············"outputs":·[
197 ················{197 ················{
198 ····················"ename":·"NameError",198 ····················"ename":·"NameError",
199 ····················"evalue":·"name·'ds'·is·not·defined",199 ····················"evalue":·"name·'ds'·is·not·defined",
Offset 218, 18 lines modifiedOffset 218, 18 lines modified
218 ············]218 ············]
219 ········},219 ········},
220 ········{220 ········{
221 ············"cell_type":·"code",221 ············"cell_type":·"code",
222 ············"execution_count":·5,222 ············"execution_count":·5,
223 ············"metadata":·{223 ············"metadata":·{
224 ················"execution":·{224 ················"execution":·{
225 ····················"iopub.execute_input":·"2025-02-05T04:03:17.462151Z",225 ····················"iopub.execute_input":·"2025-02-05T04:33:49.527719Z",
226 ····················"iopub.status.busy":·"2025-02-05T04:03:17.461348Z",226 ····················"iopub.status.busy":·"2025-02-05T04:33:49.525126Z",
227 ····················"iopub.status.idle":·"2025-02-05T04:03:17.513727Z",227 ····················"iopub.status.idle":·"2025-02-05T04:33:49.647070Z",
228 ····················"shell.execute_reply":·"2025-02-05T04:03:17.512010Z"228 ····················"shell.execute_reply":·"2025-02-05T04:33:49.642719Z"
229 ················}229 ················}
230 ············},230 ············},
231 ············"outputs":·[231 ············"outputs":·[
232 ················{232 ················{
233 ····················"ename":·"NameError",233 ····················"ename":·"NameError",
234 ····················"evalue":·"name·'ds'·is·not·defined",234 ····················"evalue":·"name·'ds'·is·not·defined",
235 ····················"output_type":·"error",235 ····················"output_type":·"error",
Offset 257, 18 lines modifiedOffset 257, 18 lines modified
257 ············]257 ············]
258 ········},258 ········},
259 ········{259 ········{
260 ············"cell_type":·"code",260 ············"cell_type":·"code",
261 ············"execution_count":·6,261 ············"execution_count":·6,
262 ············"metadata":·{262 ············"metadata":·{
263 ················"execution":·{263 ················"execution":·{
264 ····················"iopub.execute_input":·"2025-02-05T04:03:17.521364Z",264 ····················"iopub.execute_input":·"2025-02-05T04:33:49.664784Z",
265 ····················"iopub.status.busy":·"2025-02-05T04:03:17.520666Z",265 ····················"iopub.status.busy":·"2025-02-05T04:33:49.663100Z",
266 ····················"iopub.status.idle":·"2025-02-05T04:03:17.568826Z",266 ····················"iopub.status.idle":·"2025-02-05T04:33:49.776262Z",
267 ····················"shell.execute_reply":·"2025-02-05T04:03:17.567172Z"267 ····················"shell.execute_reply":·"2025-02-05T04:33:49.771881Z"
268 ················}268 ················}
269 ············},269 ············},
270 ············"outputs":·[270 ············"outputs":·[
271 ················{271 ················{
272 ····················"ename":·"NameError",272 ····················"ename":·"NameError",
273 ····················"evalue":·"name·'ds'·is·not·defined",273 ····················"evalue":·"name·'ds'·is·not·defined",
274 ····················"output_type":·"error",274 ····················"output_type":·"error",
Offset 292, 18 lines modifiedOffset 292, 18 lines modified
292 ············]292 ············]
293 ········},293 ········},
294 ········{294 ········{
295 ············"cell_type":·"code",295 ············"cell_type":·"code",
296 ············"execution_count":·7,296 ············"execution_count":·7,
297 ············"metadata":·{297 ············"metadata":·{
298 ················"execution":·{298 ················"execution":·{
299 ····················"iopub.execute_input":·"2025-02-05T04:03:17.576546Z",299 ····················"iopub.execute_input":·"2025-02-05T04:33:49.794039Z",
300 ····················"iopub.status.busy":·"2025-02-05T04:03:17.575875Z",300 ····················"iopub.status.busy":·"2025-02-05T04:33:49.792394Z",
301 ····················"iopub.status.idle":·"2025-02-05T04:03:17.873078Z",301 ····················"iopub.status.idle":·"2025-02-05T04:33:50.632453Z",
302 ····················"shell.execute_reply":·"2025-02-05T04:03:17.871337Z"302 ····················"shell.execute_reply":·"2025-02-05T04:33:50.627502Z"
303 ················}303 ················}
304 ············},304 ············},
Max diff block lines reached; 166/7032 bytes (2.36%) of diff not shown.
17.2 KB
./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
17.0 KB
apply_ufunc_vectorize_1d.ipynb
16.9 KB
Pretty-printed
Similarity: 0.9994283536585367% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:34:01.650366Z', " "'iopub.status.busy': '2025-02-05T04:34:01.648728Z', 'iopub.status.idle': " "'2025-02-05T04:34:03.055277Z', 'shell.execute_reply': " "'2025-02-05T04:34:03.051552Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:34:03.070434Z', 'iopub.status.busy': " "'2025-02-05T04:34:03.068846Z', 'iopub.status.idle': '2025-02-05T04:34:0 […]
    
Offset 36, 18 lines modifiedOffset 36, 18 lines modified
36 ············"execution_count":·1,36 ············"execution_count":·1,
37 ············"metadata":·{37 ············"metadata":·{
38 ················"ExecuteTime":·{38 ················"ExecuteTime":·{
39 ····················"end_time":·"2020-01-15T14:45:51.659160Z",39 ····················"end_time":·"2020-01-15T14:45:51.659160Z",
40 ····················"start_time":·"2020-01-15T14:45:50.528742Z"40 ····················"start_time":·"2020-01-15T14:45:50.528742Z"
41 ················},41 ················},
42 ················"execution":·{42 ················"execution":·{
43 ····················"iopub.execute_input":·"2025-02-05T04:03:23.279395Z",43 ····················"iopub.execute_input":·"2025-02-05T04:34:01.650366Z",
44 ····················"iopub.status.busy":·"2025-02-05T04:03:23.278559Z",44 ····················"iopub.status.busy":·"2025-02-05T04:34:01.648728Z",
45 ····················"iopub.status.idle":·"2025-02-05T04:03:23.903957Z",45 ····················"iopub.status.idle":·"2025-02-05T04:34:03.055277Z",
46 ····················"shell.execute_reply":·"2025-02-05T04:03:23.902015Z"46 ····················"shell.execute_reply":·"2025-02-05T04:34:03.051552Z"
47 ················}47 ················}
48 ············},48 ············},
49 ············"outputs":·[49 ············"outputs":·[
50 ················{50 ················{
51 ····················"ename":·"ModuleNotFoundError",51 ····················"ename":·"ModuleNotFoundError",
52 ····················"evalue":·"No·module·named·'xarray'",52 ····················"evalue":·"No·module·named·'xarray'",
53 ····················"output_type":·"error",53 ····················"output_type":·"error",
Offset 85, 18 lines modifiedOffset 85, 18 lines modified
85 ············"execution_count":·2,85 ············"execution_count":·2,
86 ············"metadata":·{86 ············"metadata":·{
87 ················"ExecuteTime":·{87 ················"ExecuteTime":·{
88 ····················"end_time":·"2020-01-15T14:45:55.431708Z",88 ····················"end_time":·"2020-01-15T14:45:55.431708Z",
89 ····················"start_time":·"2020-01-15T14:45:55.104701Z"89 ····················"start_time":·"2020-01-15T14:45:55.104701Z"
90 ················},90 ················},
91 ················"execution":·{91 ················"execution":·{
92 ····················"iopub.execute_input":·"2025-02-05T04:03:23.912999Z",92 ····················"iopub.execute_input":·"2025-02-05T04:34:03.070434Z",
93 ····················"iopub.status.busy":·"2025-02-05T04:03:23.912191Z",93 ····················"iopub.status.busy":·"2025-02-05T04:34:03.068846Z",
94 ····················"iopub.status.idle":·"2025-02-05T04:03:23.966681Z",94 ····················"iopub.status.idle":·"2025-02-05T04:34:03.172639Z",
95 ····················"shell.execute_reply":·"2025-02-05T04:03:23.964606Z"95 ····················"shell.execute_reply":·"2025-02-05T04:34:03.168902Z"
96 ················}96 ················}
97 ············},97 ············},
98 ············"outputs":·[98 ············"outputs":·[
99 ················{99 ················{
100 ····················"ename":·"NameError",100 ····················"ename":·"NameError",
101 ····················"evalue":·"name·'np'·is·not·defined",101 ····················"evalue":·"name·'np'·is·not·defined",
102 ····················"output_type":·"error",102 ····················"output_type":·"error",
Offset 125, 18 lines modifiedOffset 125, 18 lines modified
125 ············"execution_count":·3,125 ············"execution_count":·3,
126 ············"metadata":·{126 ············"metadata":·{
127 ················"ExecuteTime":·{127 ················"ExecuteTime":·{
128 ····················"end_time":·"2020-01-15T14:45:57.889496Z",128 ····················"end_time":·"2020-01-15T14:45:57.889496Z",
129 ····················"start_time":·"2020-01-15T14:45:57.792269Z"129 ····················"start_time":·"2020-01-15T14:45:57.792269Z"
130 ················},130 ················},
131 ················"execution":·{131 ················"execution":·{
132 ····················"iopub.execute_input":·"2025-02-05T04:03:23.975228Z",132 ····················"iopub.execute_input":·"2025-02-05T04:34:03.188272Z",
133 ····················"iopub.status.busy":·"2025-02-05T04:03:23.974489Z",133 ····················"iopub.status.busy":·"2025-02-05T04:34:03.186761Z",
134 ····················"iopub.status.idle":·"2025-02-05T04:03:24.037315Z",134 ····················"iopub.status.idle":·"2025-02-05T04:34:03.307322Z",
135 ····················"shell.execute_reply":·"2025-02-05T04:03:24.035285Z"135 ····················"shell.execute_reply":·"2025-02-05T04:34:03.303580Z"
136 ················}136 ················}
137 ············},137 ············},
138 ············"outputs":·[138 ············"outputs":·[
139 ················{139 ················{
140 ····················"ename":·"NameError",140 ····················"ename":·"NameError",
141 ····················"evalue":·"name·'air'·is·not·defined",141 ····················"evalue":·"name·'air'·is·not·defined",
142 ····················"output_type":·"error",142 ····················"output_type":·"error",
Offset 184, 18 lines modifiedOffset 184, 18 lines modified
184 ············"execution_count":·4,184 ············"execution_count":·4,
185 ············"metadata":·{185 ············"metadata":·{
186 ················"ExecuteTime":·{186 ················"ExecuteTime":·{
187 ····················"end_time":·"2020-01-15T14:45:59.768626Z",187 ····················"end_time":·"2020-01-15T14:45:59.768626Z",
188 ····················"start_time":·"2020-01-15T14:45:59.543808Z"188 ····················"start_time":·"2020-01-15T14:45:59.543808Z"
189 ················},189 ················},
190 ················"execution":·{190 ················"execution":·{
191 ····················"iopub.execute_input":·"2025-02-05T04:03:24.046344Z",191 ····················"iopub.execute_input":·"2025-02-05T04:34:03.322356Z",
192 ····················"iopub.status.busy":·"2025-02-05T04:03:24.045536Z",192 ····················"iopub.status.busy":·"2025-02-05T04:34:03.320817Z",
193 ····················"iopub.status.idle":·"2025-02-05T04:03:24.099775Z",193 ····················"iopub.status.idle":·"2025-02-05T04:34:03.423608Z",
194 ····················"shell.execute_reply":·"2025-02-05T04:03:24.097467Z"194 ····················"shell.execute_reply":·"2025-02-05T04:34:03.419855Z"
195 ················}195 ················}
196 ············},196 ············},
197 ············"outputs":·[197 ············"outputs":·[
198 ················{198 ················{
199 ····················"ename":·"NameError",199 ····················"ename":·"NameError",
200 ····················"evalue":·"name·'xr'·is·not·defined",200 ····················"evalue":·"name·'xr'·is·not·defined",
201 ····················"output_type":·"error",201 ····················"output_type":·"error",
Offset 250, 18 lines modifiedOffset 250, 18 lines modified
250 ············"execution_count":·5,250 ············"execution_count":·5,
251 ············"metadata":·{251 ············"metadata":·{
252 ················"ExecuteTime":·{252 ················"ExecuteTime":·{
253 ····················"end_time":·"2020-01-15T14:46:02.187012Z",253 ····················"end_time":·"2020-01-15T14:46:02.187012Z",
254 ····················"start_time":·"2020-01-15T14:46:02.105563Z"254 ····················"start_time":·"2020-01-15T14:46:02.105563Z"
255 ················},255 ················},
256 ················"execution":·{256 ················"execution":·{
257 ····················"iopub.execute_input":·"2025-02-05T04:03:24.109417Z",257 ····················"iopub.execute_input":·"2025-02-05T04:34:03.438486Z",
258 ····················"iopub.status.busy":·"2025-02-05T04:03:24.108552Z",258 ····················"iopub.status.busy":·"2025-02-05T04:34:03.436854Z",
259 ····················"iopub.status.idle":·"2025-02-05T04:03:24.165275Z",259 ····················"iopub.status.idle":·"2025-02-05T04:34:03.545208Z",
260 ····················"shell.execute_reply":·"2025-02-05T04:03:24.163280Z"260 ····················"shell.execute_reply":·"2025-02-05T04:34:03.541527Z"
261 ················}261 ················}
262 ············},262 ············},
263 ············"outputs":·[263 ············"outputs":·[
264 ················{264 ················{
265 ····················"ename":·"NameError",265 ····················"ename":·"NameError",
266 ····················"evalue":·"name·'xr'·is·not·defined",266 ····················"evalue":·"name·'xr'·is·not·defined",
267 ····················"output_type":·"error",267 ····················"output_type":·"error",
Offset 328, 18 lines modifiedOffset 328, 18 lines modified
328 ············"execution_count":·6,328 ············"execution_count":·6,
329 ············"metadata":·{329 ············"metadata":·{
330 ················"ExecuteTime":·{330 ················"ExecuteTime":·{
331 ····················"end_time":·"2020-01-15T14:46:05.031672Z",331 ····················"end_time":·"2020-01-15T14:46:05.031672Z",
332 ····················"start_time":·"2020-01-15T14:46:04.947588Z"332 ····················"start_time":·"2020-01-15T14:46:04.947588Z"
333 ················},333 ················},
334 ················"execution":·{334 ················"execution":·{
335 ····················"iopub.execute_input":·"2025-02-05T04:03:24.174557Z",335 ····················"iopub.execute_input":·"2025-02-05T04:34:03.561373Z",
336 ····················"iopub.status.busy":·"2025-02-05T04:03:24.173741Z",336 ····················"iopub.status.busy":·"2025-02-05T04:34:03.559856Z",
337 ····················"iopub.status.idle":·"2025-02-05T04:03:24.230021Z",337 ····················"iopub.status.idle":·"2025-02-05T04:34:03.671453Z",
338 ····················"shell.execute_reply":·"2025-02-05T04:03:24.227939Z"338 ····················"shell.execute_reply":·"2025-02-05T04:34:03.667604Z"
339 ················}339 ················}
340 ············},340 ············},
341 ············"outputs":·[341 ············"outputs":·[
342 ················{342 ················{
343 ····················"ename":·"NameError",343 ····················"ename":·"NameError",
344 ····················"evalue":·"name·'xr'·is·not·defined",344 ····················"evalue":·"name·'xr'·is·not·defined",
345 ····················"output_type":·"error",345 ····················"output_type":·"error",
Offset 374, 18 lines modifiedOffset 374, 18 lines modified
374 ············"execution_count":·7,374 ············"execution_count":·7,
375 ············"metadata":·{375 ············"metadata":·{
376 ················"ExecuteTime":·{376 ················"ExecuteTime":·{
377 ····················"end_time":·"2020-01-15T14:46:09.325218Z",377 ····················"end_time":·"2020-01-15T14:46:09.325218Z",
378 ····················"start_time":·"2020-01-15T14:46:09.303020Z"378 ····················"start_time":·"2020-01-15T14:46:09.303020Z"
379 ················},379 ················},
380 ················"execution":·{380 ················"execution":·{
381 ····················"iopub.execute_input":·"2025-02-05T04:03:24.238577Z",381 ····················"iopub.execute_input":·"2025-02-05T04:34:03.686462Z",
382 ····················"iopub.status.busy":·"2025-02-05T04:03:24.237788Z",382 ····················"iopub.status.busy":·"2025-02-05T04:34:03.684898Z",
383 ····················"iopub.status.idle":·"2025-02-05T04:03:24.297510Z",383 ····················"iopub.status.idle":·"2025-02-05T04:34:03.800897Z",
384 ····················"shell.execute_reply":·"2025-02-05T04:03:24.295427Z"384 ····················"shell.execute_reply":·"2025-02-05T04:34:03.797169Z"
385 ················}385 ················}
386 ············},386 ············},
Max diff block lines reached; 9118/16771 bytes (54.37%) of diff not shown.
8.44 KB
./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
8.28 KB
area_weighted_temperature.ipynb
8.22 KB
Pretty-printed
Similarity: 0.99921875% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:34:20.056187Z', " "'iopub.status.busy': '2025-02-05T04:34:20.053181Z', 'iopub.status.idle': " "'2025-02-05T04:34:25.149556Z', 'shell.execute_reply': " "'2025-02-05T04:34:25.145710Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:34:25.166063Z', 'iopub.status.busy': " "'2025-02-05T04:34:25.164449Z', 'iopub.status.idle': '2025-02-05T04:34:2 […]
    
Offset 28, 18 lines modifiedOffset 28, 18 lines modified
28 ············"execution_count":·1,28 ············"execution_count":·1,
29 ············"metadata":·{29 ············"metadata":·{
30 ················"ExecuteTime":·{30 ················"ExecuteTime":·{
31 ····················"end_time":·"2020-03-17T14:43:57.222351Z",31 ····················"end_time":·"2020-03-17T14:43:57.222351Z",
32 ····················"start_time":·"2020-03-17T14:43:56.147541Z"32 ····················"start_time":·"2020-03-17T14:43:56.147541Z"
33 ················},33 ················},
34 ················"execution":·{34 ················"execution":·{
35 ····················"iopub.execute_input":·"2025-02-05T04:03:32.207686Z",35 ····················"iopub.execute_input":·"2025-02-05T04:34:20.056187Z",
36 ····················"iopub.status.busy":·"2025-02-05T04:03:32.206915Z",36 ····················"iopub.status.busy":·"2025-02-05T04:34:20.053181Z",
37 ····················"iopub.status.idle":·"2025-02-05T04:03:34.484451Z",37 ····················"iopub.status.idle":·"2025-02-05T04:34:25.149556Z",
38 ····················"shell.execute_reply":·"2025-02-05T04:03:34.482374Z"38 ····················"shell.execute_reply":·"2025-02-05T04:34:25.145710Z"
39 ················}39 ················}
40 ············},40 ············},
41 ············"outputs":·[41 ············"outputs":·[
42 ················{42 ················{
43 ····················"ename":·"ModuleNotFoundError",43 ····················"ename":·"ModuleNotFoundError",
44 ····················"evalue":·"No·module·named·'xarray'",44 ····················"evalue":·"No·module·named·'xarray'",
45 ····················"output_type":·"error",45 ····················"output_type":·"error",
Offset 75, 18 lines modifiedOffset 75, 18 lines modified
75 ············"execution_count":·2,75 ············"execution_count":·2,
76 ············"metadata":·{76 ············"metadata":·{
77 ················"ExecuteTime":·{77 ················"ExecuteTime":·{
78 ····················"end_time":·"2020-03-17T14:43:57.831734Z",78 ····················"end_time":·"2020-03-17T14:43:57.831734Z",
79 ····················"start_time":·"2020-03-17T14:43:57.651845Z"79 ····················"start_time":·"2020-03-17T14:43:57.651845Z"
80 ················},80 ················},
81 ················"execution":·{81 ················"execution":·{
82 ····················"iopub.execute_input":·"2025-02-05T04:03:34.493647Z",82 ····················"iopub.execute_input":·"2025-02-05T04:34:25.166063Z",
83 ····················"iopub.status.busy":·"2025-02-05T04:03:34.492793Z",83 ····················"iopub.status.busy":·"2025-02-05T04:34:25.164449Z",
84 ····················"iopub.status.idle":·"2025-02-05T04:03:34.551696Z",84 ····················"iopub.status.idle":·"2025-02-05T04:34:25.280547Z",
85 ····················"shell.execute_reply":·"2025-02-05T04:03:34.549566Z"85 ····················"shell.execute_reply":·"2025-02-05T04:34:25.276881Z"
86 ················}86 ················}
87 ············},87 ············},
88 ············"outputs":·[88 ············"outputs":·[
89 ················{89 ················{
90 ····················"ename":·"NameError",90 ····················"ename":·"NameError",
91 ····················"evalue":·"name·'xr'·is·not·defined",91 ····················"evalue":·"name·'xr'·is·not·defined",
92 ····················"output_type":·"error",92 ····················"output_type":·"error",
Offset 122, 18 lines modifiedOffset 122, 18 lines modified
122 ············"execution_count":·3,122 ············"execution_count":·3,
123 ············"metadata":·{123 ············"metadata":·{
124 ················"ExecuteTime":·{124 ················"ExecuteTime":·{
125 ····················"end_time":·"2020-03-17T14:43:59.887120Z",125 ····················"end_time":·"2020-03-17T14:43:59.887120Z",
126 ····················"start_time":·"2020-03-17T14:43:59.582894Z"126 ····················"start_time":·"2020-03-17T14:43:59.582894Z"
127 ················},127 ················},
128 ················"execution":·{128 ················"execution":·{
129 ····················"iopub.execute_input":·"2025-02-05T04:03:34.560669Z",129 ····················"iopub.execute_input":·"2025-02-05T04:34:25.296176Z",
130 ····················"iopub.status.busy":·"2025-02-05T04:03:34.559915Z",130 ····················"iopub.status.busy":·"2025-02-05T04:34:25.294665Z",
131 ····················"iopub.status.idle":·"2025-02-05T04:03:34.848041Z",131 ····················"iopub.status.idle":·"2025-02-05T04:34:25.923724Z",
132 ····················"shell.execute_reply":·"2025-02-05T04:03:34.846029Z"132 ····················"shell.execute_reply":·"2025-02-05T04:34:25.919825Z"
133 ················}133 ················}
134 ············},134 ············},
135 ············"outputs":·[135 ············"outputs":·[
136 ················{136 ················{
137 ····················"ename":·"NameError",137 ····················"ename":·"NameError",
138 ····················"evalue":·"name·'air'·is·not·defined",138 ····················"evalue":·"name·'air'·is·not·defined",
139 ····················"output_type":·"error",139 ····················"output_type":·"error",
Offset 178, 18 lines modifiedOffset 178, 18 lines modified
178 ············"execution_count":·4,178 ············"execution_count":·4,
179 ············"metadata":·{179 ············"metadata":·{
180 ················"ExecuteTime":·{180 ················"ExecuteTime":·{
181 ····················"end_time":·"2020-03-17T14:44:18.777092Z",181 ····················"end_time":·"2020-03-17T14:44:18.777092Z",
182 ····················"start_time":·"2020-03-17T14:44:18.736587Z"182 ····················"start_time":·"2020-03-17T14:44:18.736587Z"
183 ················},183 ················},
184 ················"execution":·{184 ················"execution":·{
185 ····················"iopub.execute_input":·"2025-02-05T04:03:34.857035Z",185 ····················"iopub.execute_input":·"2025-02-05T04:34:25.938592Z",
186 ····················"iopub.status.busy":·"2025-02-05T04:03:34.856180Z",186 ····················"iopub.status.busy":·"2025-02-05T04:34:25.937021Z",
187 ····················"iopub.status.idle":·"2025-02-05T04:03:34.913982Z",187 ····················"iopub.status.idle":·"2025-02-05T04:34:26.051124Z",
188 ····················"shell.execute_reply":·"2025-02-05T04:03:34.911980Z"188 ····················"shell.execute_reply":·"2025-02-05T04:34:26.047502Z"
189 ················}189 ················}
190 ············},190 ············},
191 ············"outputs":·[191 ············"outputs":·[
192 ················{192 ················{
193 ····················"ename":·"NameError",193 ····················"ename":·"NameError",
194 ····················"evalue":·"name·'air'·is·not·defined",194 ····················"evalue":·"name·'air'·is·not·defined",
195 ····················"output_type":·"error",195 ····················"output_type":·"error",
Offset 219, 18 lines modifiedOffset 219, 18 lines modified
219 ············"execution_count":·5,219 ············"execution_count":·5,
220 ············"metadata":·{220 ············"metadata":·{
221 ················"ExecuteTime":·{221 ················"ExecuteTime":·{
222 ····················"end_time":·"2020-03-17T14:44:52.607120Z",222 ····················"end_time":·"2020-03-17T14:44:52.607120Z",
223 ····················"start_time":·"2020-03-17T14:44:52.564674Z"223 ····················"start_time":·"2020-03-17T14:44:52.564674Z"
224 ················},224 ················},
225 ················"execution":·{225 ················"execution":·{
226 ····················"iopub.execute_input":·"2025-02-05T04:03:34.922813Z",226 ····················"iopub.execute_input":·"2025-02-05T04:34:26.066583Z",
227 ····················"iopub.status.busy":·"2025-02-05T04:03:34.922081Z",227 ····················"iopub.status.busy":·"2025-02-05T04:34:26.064994Z",
228 ····················"iopub.status.idle":·"2025-02-05T04:03:35.003732Z",228 ····················"iopub.status.idle":·"2025-02-05T04:34:26.231287Z",
229 ····················"shell.execute_reply":·"2025-02-05T04:03:35.001783Z"229 ····················"shell.execute_reply":·"2025-02-05T04:34:26.227579Z"
230 ················}230 ················}
231 ············},231 ············},
232 ············"outputs":·[232 ············"outputs":·[
233 ················{233 ················{
234 ····················"ename":·"NameError",234 ····················"ename":·"NameError",
235 ····················"evalue":·"name·'air'·is·not·defined",235 ····················"evalue":·"name·'air'·is·not·defined",
236 ····················"output_type":·"error",236 ····················"output_type":·"error",
Offset 252, 18 lines modifiedOffset 252, 18 lines modified
252 ············"execution_count":·6,252 ············"execution_count":·6,
253 ············"metadata":·{253 ············"metadata":·{
254 ················"ExecuteTime":·{254 ················"ExecuteTime":·{
255 ····················"end_time":·"2020-03-17T14:44:54.334279Z",255 ····················"end_time":·"2020-03-17T14:44:54.334279Z",
256 ····················"start_time":·"2020-03-17T14:44:54.280022Z"256 ····················"start_time":·"2020-03-17T14:44:54.280022Z"
257 ················},257 ················},
258 ················"execution":·{258 ················"execution":·{
259 ····················"iopub.execute_input":·"2025-02-05T04:03:35.012338Z",259 ····················"iopub.execute_input":·"2025-02-05T04:34:26.246367Z",
260 ····················"iopub.status.busy":·"2025-02-05T04:03:35.011585Z",260 ····················"iopub.status.busy":·"2025-02-05T04:34:26.244819Z",
261 ····················"iopub.status.idle":·"2025-02-05T04:03:35.064913Z",261 ····················"iopub.status.idle":·"2025-02-05T04:34:26.350680Z",
262 ····················"shell.execute_reply":·"2025-02-05T04:03:35.062854Z"262 ····················"shell.execute_reply":·"2025-02-05T04:34:26.346996Z"
263 ················}263 ················}
264 ············},264 ············},
265 ············"outputs":·[265 ············"outputs":·[
266 ················{266 ················{
267 ····················"ename":·"NameError",267 ····················"ename":·"NameError",
268 ····················"evalue":·"name·'air_weighted'·is·not·defined",268 ····················"evalue":·"name·'air_weighted'·is·not·defined",
269 ····················"output_type":·"error",269 ····················"output_type":·"error",
Offset 294, 18 lines modifiedOffset 294, 18 lines modified
294 ············"execution_count":·7,294 ············"execution_count":·7,
295 ············"metadata":·{295 ············"metadata":·{
296 ················"ExecuteTime":·{296 ················"ExecuteTime":·{
297 ····················"end_time":·"2020-03-17T14:45:08.877307Z",297 ····················"end_time":·"2020-03-17T14:45:08.877307Z",
298 ····················"start_time":·"2020-03-17T14:45:08.673383Z"298 ····················"start_time":·"2020-03-17T14:45:08.673383Z"
299 ················},299 ················},
300 ················"execution":·{300 ················"execution":·{
301 ····················"iopub.execute_input":·"2025-02-05T04:03:35.074198Z",301 ····················"iopub.execute_input":·"2025-02-05T04:34:26.366238Z",
302 ····················"iopub.status.busy":·"2025-02-05T04:03:35.073380Z",302 ····················"iopub.status.busy":·"2025-02-05T04:34:26.364703Z",
303 ····················"iopub.status.idle":·"2025-02-05T04:03:35.122456Z",303 ····················"iopub.status.idle":·"2025-02-05T04:34:26.477932Z",
304 ····················"shell.execute_reply":·"2025-02-05T04:03:35.120671Z"304 ····················"shell.execute_reply":·"2025-02-05T04:34:26.474279Z"
305 ················}305 ················}
306 ············},306 ············},
Max diff block lines reached; 177/7842 bytes (2.26%) of diff not shown.
1.5 KB
./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb
1.37 KB
Pretty-printed
Similarity: 0.9991319444444444% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:34:37.441125Z', " "'iopub.status.busy': '2025-02-05T04:34:37.439607Z', 'iopub.status.idle': " "'2025-02-05T04:34:38.834766Z', 'shell.execute_reply': " "'2025-02-05T04:34:38.830936Z'}}}}"}
    
Offset 12, 18 lines modifiedOffset 12, 18 lines modified
12 ········},12 ········},
13 ········{13 ········{
14 ············"cell_type":·"code",14 ············"cell_type":·"code",
15 ············"execution_count":·1,15 ············"execution_count":·1,
16 ············"id":·"41b90ede",16 ············"id":·"41b90ede",
17 ············"metadata":·{17 ············"metadata":·{
18 ················"execution":·{18 ················"execution":·{
19 ····················"iopub.execute_input":·"2025-02-05T04:03:40.623451Z",19 ····················"iopub.execute_input":·"2025-02-05T04:34:37.441125Z",
20 ····················"iopub.status.busy":·"2025-02-05T04:03:40.622585Z",20 ····················"iopub.status.busy":·"2025-02-05T04:34:37.439607Z",
21 ····················"iopub.status.idle":·"2025-02-05T04:03:41.235347Z",21 ····················"iopub.status.idle":·"2025-02-05T04:34:38.834766Z",
22 ····················"shell.execute_reply":·"2025-02-05T04:03:41.233386Z"22 ····················"shell.execute_reply":·"2025-02-05T04:34:38.830936Z"
23 ················}23 ················}
24 ············},24 ············},
25 ············"outputs":·[25 ············"outputs":·[
26 ················{26 ················{
27 ····················"ename":·"ModuleNotFoundError",27 ····················"ename":·"ModuleNotFoundError",
28 ····················"evalue":·"No·module·named·'xarray'",28 ····················"evalue":·"No·module·named·'xarray'",
29 ····················"output_type":·"error",29 ····················"output_type":·"error",
9.47 KB
./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
9.33 KB
monthly-means.ipynb
9.29 KB
Pretty-printed
Similarity: 0.998721590909091% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:34:48.434195Z', " "'iopub.status.busy': '2025-02-05T04:34:48.432308Z', 'iopub.status.idle': " "'2025-02-05T04:34:55.199410Z', 'shell.execute_reply': " "'2025-02-05T04:34:55.194783Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:34:55.215533Z', 'iopub.status.busy': " "'2025-02-05T04:34:55.213710Z', 'iopub.status.idle': '2025-02-05T04:34:5 […]
    
Offset 19, 18 lines modifiedOffset 19, 18 lines modified
19 ············"execution_count":·1,19 ············"execution_count":·1,
20 ············"metadata":·{20 ············"metadata":·{
21 ················"ExecuteTime":·{21 ················"ExecuteTime":·{
22 ····················"end_time":·"2018-11-28T20:51:35.958210Z",22 ····················"end_time":·"2018-11-28T20:51:35.958210Z",
23 ····················"start_time":·"2018-11-28T20:51:35.936966Z"23 ····················"start_time":·"2018-11-28T20:51:35.936966Z"
24 ················},24 ················},
25 ················"execution":·{25 ················"execution":·{
26 ····················"iopub.execute_input":·"2025-02-05T04:03:45.350849Z",26 ····················"iopub.execute_input":·"2025-02-05T04:34:48.434195Z",
27 ····················"iopub.status.busy":·"2025-02-05T04:03:45.350196Z",27 ····················"iopub.status.busy":·"2025-02-05T04:34:48.432308Z",
28 ····················"iopub.status.idle":·"2025-02-05T04:03:47.990287Z",28 ····················"iopub.status.idle":·"2025-02-05T04:34:55.199410Z",
29 ····················"shell.execute_reply":·"2025-02-05T04:03:47.988513Z"29 ····················"shell.execute_reply":·"2025-02-05T04:34:55.194783Z"
30 ················}30 ················}
31 ············},31 ············},
32 ············"outputs":·[32 ············"outputs":·[
33 ················{33 ················{
34 ····················"ename":·"ModuleNotFoundError",34 ····················"ename":·"ModuleNotFoundError",
35 ····················"evalue":·"No·module·named·'xarray'",35 ····················"evalue":·"No·module·named·'xarray'",
36 ····················"output_type":·"error",36 ····················"output_type":·"error",
Offset 62, 18 lines modifiedOffset 62, 18 lines modified
62 ············"execution_count":·2,62 ············"execution_count":·2,
63 ············"metadata":·{63 ············"metadata":·{
64 ················"ExecuteTime":·{64 ················"ExecuteTime":·{
65 ····················"end_time":·"2018-11-28T20:51:36.072316Z",65 ····················"end_time":·"2018-11-28T20:51:36.072316Z",
66 ····················"start_time":·"2018-11-28T20:51:36.016594Z"66 ····················"start_time":·"2018-11-28T20:51:36.016594Z"
67 ················},67 ················},
68 ················"execution":·{68 ················"execution":·{
69 ····················"iopub.execute_input":·"2025-02-05T04:03:47.997933Z",69 ····················"iopub.execute_input":·"2025-02-05T04:34:55.215533Z",
70 ····················"iopub.status.busy":·"2025-02-05T04:03:47.997234Z",70 ····················"iopub.status.busy":·"2025-02-05T04:34:55.213710Z",
71 ····················"iopub.status.idle":·"2025-02-05T04:03:48.051102Z",71 ····················"iopub.status.idle":·"2025-02-05T04:34:55.328677Z",
72 ····················"shell.execute_reply":·"2025-02-05T04:03:48.049100Z"72 ····················"shell.execute_reply":·"2025-02-05T04:34:55.324113Z"
73 ················}73 ················}
74 ············},74 ············},
75 ············"outputs":·[75 ············"outputs":·[
76 ················{76 ················{
77 ····················"ename":·"NameError",77 ····················"ename":·"NameError",
78 ····················"evalue":·"name·'xr'·is·not·defined",78 ····················"evalue":·"name·'xr'·is·not·defined",
79 ····················"output_type":·"error",79 ····················"output_type":·"error",
Offset 103, 18 lines modifiedOffset 103, 18 lines modified
103 ············]103 ············]
104 ········},104 ········},
105 ········{105 ········{
106 ············"cell_type":·"code",106 ············"cell_type":·"code",
107 ············"execution_count":·3,107 ············"execution_count":·3,
108 ············"metadata":·{108 ············"metadata":·{
109 ················"execution":·{109 ················"execution":·{
110 ····················"iopub.execute_input":·"2025-02-05T04:03:48.059309Z",110 ····················"iopub.execute_input":·"2025-02-05T04:34:55.345995Z",
111 ····················"iopub.status.busy":·"2025-02-05T04:03:48.058571Z",111 ····················"iopub.status.busy":·"2025-02-05T04:34:55.344252Z",
112 ····················"iopub.status.idle":·"2025-02-05T04:03:48.113362Z",112 ····················"iopub.status.idle":·"2025-02-05T04:34:55.452312Z",
113 ····················"shell.execute_reply":·"2025-02-05T04:03:48.111276Z"113 ····················"shell.execute_reply":·"2025-02-05T04:34:55.447835Z"
114 ················}114 ················}
115 ············},115 ············},
116 ············"outputs":·[116 ············"outputs":·[
117 ················{117 ················{
118 ····················"ename":·"NameError",118 ····················"ename":·"NameError",
119 ····················"evalue":·"name·'ds'·is·not·defined",119 ····················"evalue":·"name·'ds'·is·not·defined",
120 ····················"output_type":·"error",120 ····················"output_type":·"error",
Offset 136, 18 lines modifiedOffset 136, 18 lines modified
136 ············"execution_count":·4,136 ············"execution_count":·4,
137 ············"metadata":·{137 ············"metadata":·{
138 ················"ExecuteTime":·{138 ················"ExecuteTime":·{
139 ····················"end_time":·"2018-11-28T20:51:36.132413Z",139 ····················"end_time":·"2018-11-28T20:51:36.132413Z",
140 ····················"start_time":·"2018-11-28T20:51:36.073708Z"140 ····················"start_time":·"2018-11-28T20:51:36.073708Z"
141 ················},141 ················},
142 ················"execution":·{142 ················"execution":·{
143 ····················"iopub.execute_input":·"2025-02-05T04:03:48.122849Z",143 ····················"iopub.execute_input":·"2025-02-05T04:34:55.468341Z",
144 ····················"iopub.status.busy":·"2025-02-05T04:03:48.121963Z",144 ····················"iopub.status.busy":·"2025-02-05T04:34:55.466721Z",
145 ····················"iopub.status.idle":·"2025-02-05T04:03:48.184773Z",145 ····················"iopub.status.idle":·"2025-02-05T04:34:55.591829Z",
146 ····················"shell.execute_reply":·"2025-02-05T04:03:48.182914Z"146 ····················"shell.execute_reply":·"2025-02-05T04:34:55.587145Z"
147 ················}147 ················}
148 ············},148 ············},
149 ············"outputs":·[149 ············"outputs":·[
150 ················{150 ················{
151 ····················"ename":·"NameError",151 ····················"ename":·"NameError",
152 ····················"evalue":·"name·'month_length'·is·not·defined",152 ····················"evalue":·"name·'month_length'·is·not·defined",
153 ····················"output_type":·"error",153 ····················"output_type":·"error",
Offset 177, 18 lines modifiedOffset 177, 18 lines modified
177 ············"execution_count":·5,177 ············"execution_count":·5,
178 ············"metadata":·{178 ············"metadata":·{
179 ················"ExecuteTime":·{179 ················"ExecuteTime":·{
180 ····················"end_time":·"2018-11-28T20:51:36.152913Z",180 ····················"end_time":·"2018-11-28T20:51:36.152913Z",
181 ····················"start_time":·"2018-11-28T20:51:36.133997Z"181 ····················"start_time":·"2018-11-28T20:51:36.133997Z"
182 ················},182 ················},
183 ················"execution":·{183 ················"execution":·{
184 ····················"iopub.execute_input":·"2025-02-05T04:03:48.193746Z",184 ····················"iopub.execute_input":·"2025-02-05T04:34:55.607899Z",
185 ····················"iopub.status.busy":·"2025-02-05T04:03:48.192923Z",185 ····················"iopub.status.busy":·"2025-02-05T04:34:55.606304Z",
186 ····················"iopub.status.idle":·"2025-02-05T04:03:48.245447Z",186 ····················"iopub.status.idle":·"2025-02-05T04:34:55.712432Z",
187 ····················"shell.execute_reply":·"2025-02-05T04:03:48.243516Z"187 ····················"shell.execute_reply":·"2025-02-05T04:34:55.707830Z"
188 ················}188 ················}
189 ············},189 ············},
190 ············"outputs":·[190 ············"outputs":·[
191 ················{191 ················{
192 ····················"ename":·"NameError",192 ····················"ename":·"NameError",
193 ····················"evalue":·"name·'ds_weighted'·is·not·defined",193 ····················"evalue":·"name·'ds_weighted'·is·not·defined",
194 ····················"output_type":·"error",194 ····················"output_type":·"error",
Offset 209, 18 lines modifiedOffset 209, 18 lines modified
209 ············"execution_count":·6,209 ············"execution_count":·6,
210 ············"metadata":·{210 ············"metadata":·{
211 ················"ExecuteTime":·{211 ················"ExecuteTime":·{
212 ····················"end_time":·"2018-11-28T20:51:36.190765Z",212 ····················"end_time":·"2018-11-28T20:51:36.190765Z",
213 ····················"start_time":·"2018-11-28T20:51:36.154416Z"213 ····················"start_time":·"2018-11-28T20:51:36.154416Z"
214 ················},214 ················},
215 ················"execution":·{215 ················"execution":·{
216 ····················"iopub.execute_input":·"2025-02-05T04:03:48.253778Z",216 ····················"iopub.execute_input":·"2025-02-05T04:34:55.727665Z",
217 ····················"iopub.status.busy":·"2025-02-05T04:03:48.253042Z",217 ····················"iopub.status.busy":·"2025-02-05T04:34:55.725962Z",
218 ····················"iopub.status.idle":·"2025-02-05T04:03:48.305814Z",218 ····················"iopub.status.idle":·"2025-02-05T04:34:55.836071Z",
219 ····················"shell.execute_reply":·"2025-02-05T04:03:48.303850Z"219 ····················"shell.execute_reply":·"2025-02-05T04:34:55.831442Z"
220 ················}220 ················}
221 ············},221 ············},
222 ············"outputs":·[222 ············"outputs":·[
223 ················{223 ················{
224 ····················"ename":·"NameError",224 ····················"ename":·"NameError",
225 ····················"evalue":·"name·'ds'·is·not·defined",225 ····················"evalue":·"name·'ds'·is·not·defined",
226 ····················"output_type":·"error",226 ····················"output_type":·"error",
Offset 243, 18 lines modifiedOffset 243, 18 lines modified
243 ············"execution_count":·7,243 ············"execution_count":·7,
244 ············"metadata":·{244 ············"metadata":·{
245 ················"ExecuteTime":·{245 ················"ExecuteTime":·{
246 ····················"end_time":·"2018-11-28T20:51:40.264871Z",246 ····················"end_time":·"2018-11-28T20:51:40.264871Z",
247 ····················"start_time":·"2018-11-28T20:51:36.192467Z"247 ····················"start_time":·"2018-11-28T20:51:36.192467Z"
248 ················},248 ················},
249 ················"execution":·{249 ················"execution":·{
250 ····················"iopub.execute_input":·"2025-02-05T04:03:48.314354Z",250 ····················"iopub.execute_input":·"2025-02-05T04:34:55.852176Z",
251 ····················"iopub.status.busy":·"2025-02-05T04:03:48.313581Z",251 ····················"iopub.status.busy":·"2025-02-05T04:34:55.850499Z",
252 ····················"iopub.status.idle":·"2025-02-05T04:03:48.417969Z",252 ····················"iopub.status.idle":·"2025-02-05T04:34:56.068912Z",
253 ····················"shell.execute_reply":·"2025-02-05T04:03:48.415915Z"253 ····················"shell.execute_reply":·"2025-02-05T04:34:56.064303Z"
254 ················}254 ················}
255 ············},255 ············},
Max diff block lines reached; 1376/8936 bytes (15.40%) of diff not shown.
8.42 KB
./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
8.26 KB
multidimensional-coords.ipynb
8.21 KB
Pretty-printed
Similarity: 0.9992708333333333% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:35:08.042836Z', " "'iopub.status.busy': '2025-02-05T04:35:08.040972Z', 'iopub.status.idle': " "'2025-02-05T04:35:15.349547Z', 'shell.execute_reply': " "'2025-02-05T04:35:15.345222Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:35:15.367266Z', 'iopub.status.busy': " "'2025-02-05T04:35:15.365385Z', 'iopub.status.idle': '2025-02-05T04:35:1 […]
    
Offset 16, 18 lines modifiedOffset 16, 18 lines modified
16 ············"execution_count":·1,16 ············"execution_count":·1,
17 ············"metadata":·{17 ············"metadata":·{
18 ················"ExecuteTime":·{18 ················"ExecuteTime":·{
19 ····················"end_time":·"2018-11-28T20:49:56.068395Z",19 ····················"end_time":·"2018-11-28T20:49:56.068395Z",
20 ····················"start_time":·"2018-11-28T20:49:56.035349Z"20 ····················"start_time":·"2018-11-28T20:49:56.035349Z"
21 ················},21 ················},
22 ················"execution":·{22 ················"execution":·{
23 ····················"iopub.execute_input":·"2025-02-05T04:03:53.611547Z",23 ····················"iopub.execute_input":·"2025-02-05T04:35:08.042836Z",
24 ····················"iopub.status.busy":·"2025-02-05T04:03:53.610653Z",24 ····················"iopub.status.busy":·"2025-02-05T04:35:08.040972Z",
25 ····················"iopub.status.idle":·"2025-02-05T04:03:56.575022Z",25 ····················"iopub.status.idle":·"2025-02-05T04:35:15.349547Z",
26 ····················"shell.execute_reply":·"2025-02-05T04:03:56.572904Z"26 ····················"shell.execute_reply":·"2025-02-05T04:35:15.345222Z"
27 ················}27 ················}
28 ············},28 ············},
29 ············"outputs":·[29 ············"outputs":·[
30 ················{30 ················{
31 ····················"ename":·"ModuleNotFoundError",31 ····················"ename":·"ModuleNotFoundError",
32 ····················"evalue":·"No·module·named·'xarray'",32 ····················"evalue":·"No·module·named·'xarray'",
33 ····················"output_type":·"error",33 ····················"output_type":·"error",
Offset 60, 18 lines modifiedOffset 60, 18 lines modified
60 ············"execution_count":·2,60 ············"execution_count":·2,
61 ············"metadata":·{61 ············"metadata":·{
62 ················"ExecuteTime":·{62 ················"ExecuteTime":·{
63 ····················"end_time":·"2018-11-28T20:50:13.629720Z",63 ····················"end_time":·"2018-11-28T20:50:13.629720Z",
64 ····················"start_time":·"2018-11-28T20:50:13.484542Z"64 ····················"start_time":·"2018-11-28T20:50:13.484542Z"
65 ················},65 ················},
66 ················"execution":·{66 ················"execution":·{
67 ····················"iopub.execute_input":·"2025-02-05T04:03:56.583669Z",67 ····················"iopub.execute_input":·"2025-02-05T04:35:15.367266Z",
68 ····················"iopub.status.busy":·"2025-02-05T04:03:56.582786Z",68 ····················"iopub.status.busy":·"2025-02-05T04:35:15.365385Z",
69 ····················"iopub.status.idle":·"2025-02-05T04:03:56.639571Z",69 ····················"iopub.status.idle":·"2025-02-05T04:35:15.482340Z",
70 ····················"shell.execute_reply":·"2025-02-05T04:03:56.637579Z"70 ····················"shell.execute_reply":·"2025-02-05T04:35:15.478095Z"
71 ················}71 ················}
72 ············},72 ············},
73 ············"outputs":·[73 ············"outputs":·[
74 ················{74 ················{
75 ····················"ename":·"NameError",75 ····················"ename":·"NameError",
76 ····················"evalue":·"name·'xr'·is·not·defined",76 ····················"evalue":·"name·'xr'·is·not·defined",
77 ····················"output_type":·"error",77 ····················"output_type":·"error",
Offset 100, 18 lines modifiedOffset 100, 18 lines modified
100 ············"execution_count":·3,100 ············"execution_count":·3,
101 ············"metadata":·{101 ············"metadata":·{
102 ················"ExecuteTime":·{102 ················"ExecuteTime":·{
103 ····················"end_time":·"2018-11-28T20:50:15.836061Z",103 ····················"end_time":·"2018-11-28T20:50:15.836061Z",
104 ····················"start_time":·"2018-11-28T20:50:15.768376Z"104 ····················"start_time":·"2018-11-28T20:50:15.768376Z"
105 ················},105 ················},
106 ················"execution":·{106 ················"execution":·{
107 ····················"iopub.execute_input":·"2025-02-05T04:03:56.647241Z",107 ····················"iopub.execute_input":·"2025-02-05T04:35:15.499054Z",
108 ····················"iopub.status.busy":·"2025-02-05T04:03:56.646501Z",108 ····················"iopub.status.busy":·"2025-02-05T04:35:15.497347Z",
109 ····················"iopub.status.idle":·"2025-02-05T04:03:56.702369Z",109 ····················"iopub.status.idle":·"2025-02-05T04:35:15.609016Z",
110 ····················"shell.execute_reply":·"2025-02-05T04:03:56.700235Z"110 ····················"shell.execute_reply":·"2025-02-05T04:35:15.605460Z"
111 ················}111 ················}
112 ············},112 ············},
113 ············"outputs":·[113 ············"outputs":·[
114 ················{114 ················{
115 ····················"ename":·"NameError",115 ····················"ename":·"NameError",
116 ····················"evalue":·"name·'ds'·is·not·defined",116 ····················"evalue":·"name·'ds'·is·not·defined",
117 ····················"output_type":·"error",117 ····················"output_type":·"error",
Offset 142, 18 lines modifiedOffset 142, 18 lines modified
142 ············"execution_count":·4,142 ············"execution_count":·4,
143 ············"metadata":·{143 ············"metadata":·{
144 ················"ExecuteTime":·{144 ················"ExecuteTime":·{
145 ····················"end_time":·"2018-11-28T20:50:17.928556Z",145 ····················"end_time":·"2018-11-28T20:50:17.928556Z",
146 ····················"start_time":·"2018-11-28T20:50:17.031211Z"146 ····················"start_time":·"2018-11-28T20:50:17.031211Z"
147 ················},147 ················},
148 ················"execution":·{148 ················"execution":·{
149 ····················"iopub.execute_input":·"2025-02-05T04:03:56.711425Z",149 ····················"iopub.execute_input":·"2025-02-05T04:35:15.625335Z",
150 ····················"iopub.status.busy":·"2025-02-05T04:03:56.710606Z",150 ····················"iopub.status.busy":·"2025-02-05T04:35:15.623834Z",
151 ····················"iopub.status.idle":·"2025-02-05T04:03:56.768207Z",151 ····················"iopub.status.idle":·"2025-02-05T04:35:15.743072Z",
152 ····················"shell.execute_reply":·"2025-02-05T04:03:56.766264Z"152 ····················"shell.execute_reply":·"2025-02-05T04:35:15.739372Z"
153 ················}153 ················}
154 ············},154 ············},
155 ············"outputs":·[155 ············"outputs":·[
156 ················{156 ················{
157 ····················"ename":·"NameError",157 ····················"ename":·"NameError",
158 ····················"evalue":·"name·'plt'·is·not·defined",158 ····················"evalue":·"name·'plt'·is·not·defined",
159 ····················"output_type":·"error",159 ····················"output_type":·"error",
Offset 185, 18 lines modifiedOffset 185, 18 lines modified
185 ············"execution_count":·5,185 ············"execution_count":·5,
186 ············"metadata":·{186 ············"metadata":·{
187 ················"ExecuteTime":·{187 ················"ExecuteTime":·{
188 ····················"end_time":·"2018-11-28T20:50:20.567749Z",188 ····················"end_time":·"2018-11-28T20:50:20.567749Z",
189 ····················"start_time":·"2018-11-28T20:50:19.999393Z"189 ····················"start_time":·"2018-11-28T20:50:19.999393Z"
190 ················},190 ················},
191 ················"execution":·{191 ················"execution":·{
192 ····················"iopub.execute_input":·"2025-02-05T04:03:56.777099Z",192 ····················"iopub.execute_input":·"2025-02-05T04:35:15.758545Z",
193 ····················"iopub.status.busy":·"2025-02-05T04:03:56.776267Z",193 ····················"iopub.status.busy":·"2025-02-05T04:35:15.756966Z",
194 ····················"iopub.status.idle":·"2025-02-05T04:03:56.829168Z",194 ····················"iopub.status.idle":·"2025-02-05T04:35:15.863533Z",
195 ····················"shell.execute_reply":·"2025-02-05T04:03:56.827063Z"195 ····················"shell.execute_reply":·"2025-02-05T04:35:15.859780Z"
196 ················}196 ················}
197 ············},197 ············},
198 ············"outputs":·[198 ············"outputs":·[
199 ················{199 ················{
200 ····················"ename":·"NameError",200 ····················"ename":·"NameError",
201 ····················"evalue":·"name·'ds'·is·not·defined",201 ····················"evalue":·"name·'ds'·is·not·defined",
202 ····················"output_type":·"error",202 ····················"output_type":·"error",
Offset 224, 18 lines modifiedOffset 224, 18 lines modified
224 ············"execution_count":·6,224 ············"execution_count":·6,
225 ············"metadata":·{225 ············"metadata":·{
226 ················"ExecuteTime":·{226 ················"ExecuteTime":·{
227 ····················"end_time":·"2018-11-28T20:50:31.131708Z",227 ····················"end_time":·"2018-11-28T20:50:31.131708Z",
228 ····················"start_time":·"2018-11-28T20:50:30.444697Z"228 ····················"start_time":·"2018-11-28T20:50:30.444697Z"
229 ················},229 ················},
230 ················"execution":·{230 ················"execution":·{
231 ····················"iopub.execute_input":·"2025-02-05T04:03:56.838538Z",231 ····················"iopub.execute_input":·"2025-02-05T04:35:15.878561Z",
232 ····················"iopub.status.busy":·"2025-02-05T04:03:56.837651Z",232 ····················"iopub.status.busy":·"2025-02-05T04:35:15.877005Z",
233 ····················"iopub.status.idle":·"2025-02-05T04:03:56.899653Z",233 ····················"iopub.status.idle":·"2025-02-05T04:35:16.017280Z",
234 ····················"shell.execute_reply":·"2025-02-05T04:03:56.897681Z"234 ····················"shell.execute_reply":·"2025-02-05T04:35:16.012301Z"
235 ················}235 ················}
236 ············},236 ············},
237 ············"outputs":·[237 ············"outputs":·[
238 ················{238 ················{
239 ····················"ename":·"NameError",239 ····················"ename":·"NameError",
240 ····················"evalue":·"name·'plt'·is·not·defined",240 ····················"evalue":·"name·'plt'·is·not·defined",
241 ····················"output_type":·"error",241 ····················"output_type":·"error",
Offset 272, 18 lines modifiedOffset 272, 18 lines modified
272 ············"execution_count":·7,272 ············"execution_count":·7,
273 ············"metadata":·{273 ············"metadata":·{
274 ················"ExecuteTime":·{274 ················"ExecuteTime":·{
275 ····················"end_time":·"2018-11-28T20:50:43.670463Z",275 ····················"end_time":·"2018-11-28T20:50:43.670463Z",
276 ····················"start_time":·"2018-11-28T20:50:43.245501Z"276 ····················"start_time":·"2018-11-28T20:50:43.245501Z"
277 ················},277 ················},
278 ················"execution":·{278 ················"execution":·{
279 ····················"iopub.execute_input":·"2025-02-05T04:03:56.908473Z",279 ····················"iopub.execute_input":·"2025-02-05T04:35:16.036759Z",
280 ····················"iopub.status.busy":·"2025-02-05T04:03:56.907701Z",280 ····················"iopub.status.busy":·"2025-02-05T04:35:16.034866Z",
281 ····················"iopub.status.idle":·"2025-02-05T04:03:56.966643Z",281 ····················"iopub.status.idle":·"2025-02-05T04:35:16.181784Z",
282 ····················"shell.execute_reply":·"2025-02-05T04:03:56.964598Z"282 ····················"shell.execute_reply":·"2025-02-05T04:35:16.176594Z"
283 ················}283 ················}
284 ············},284 ············},
Max diff block lines reached; 166/7820 bytes (2.12%) of diff not shown.
6.66 KB
./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
6.51 KB
visualization_gallery.ipynb
6.45 KB
Pretty-printed
Similarity: 0.9984375% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:35:27.995536Z', " "'iopub.status.busy': '2025-02-05T04:35:27.993974Z', 'iopub.status.idle': " "'2025-02-05T04:35:32.959266Z', 'shell.execute_reply': " "'2025-02-05T04:35:32.955563Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:35:32.973697Z', 'iopub.status.busy': " "'2025-02-05T04:35:32.972137Z', 'iopub.status.idle': '2025-02-05T04:35:3 […]
    
Offset 10, 18 lines modifiedOffset 10, 18 lines modified
10 ············]10 ············]
11 ········},11 ········},
12 ········{12 ········{
13 ············"cell_type":·"code",13 ············"cell_type":·"code",
14 ············"execution_count":·1,14 ············"execution_count":·1,
15 ············"metadata":·{15 ············"metadata":·{
16 ················"execution":·{16 ················"execution":·{
17 ····················"iopub.execute_input":·"2025-02-05T04:04:05.259357Z",17 ····················"iopub.execute_input":·"2025-02-05T04:35:27.995536Z",
18 ····················"iopub.status.busy":·"2025-02-05T04:04:05.258699Z",18 ····················"iopub.status.busy":·"2025-02-05T04:35:27.993974Z",
19 ····················"iopub.status.idle":·"2025-02-05T04:04:07.378984Z",19 ····················"iopub.status.idle":·"2025-02-05T04:35:32.959266Z",
20 ····················"shell.execute_reply":·"2025-02-05T04:04:07.376976Z"20 ····················"shell.execute_reply":·"2025-02-05T04:35:32.955563Z"
21 ················}21 ················}
22 ············},22 ············},
23 ············"outputs":·[23 ············"outputs":·[
24 ················{24 ················{
25 ····················"ename":·"ModuleNotFoundError",25 ····················"ename":·"ModuleNotFoundError",
26 ····················"evalue":·"No·module·named·'xarray'",26 ····················"evalue":·"No·module·named·'xarray'",
27 ····················"output_type":·"error",27 ····················"output_type":·"error",
Offset 49, 18 lines modifiedOffset 49, 18 lines modified
49 ············]49 ············]
50 ········},50 ········},
51 ········{51 ········{
52 ············"cell_type":·"code",52 ············"cell_type":·"code",
53 ············"execution_count":·2,53 ············"execution_count":·2,
54 ············"metadata":·{54 ············"metadata":·{
55 ················"execution":·{55 ················"execution":·{
56 ····················"iopub.execute_input":·"2025-02-05T04:04:07.386273Z",56 ····················"iopub.execute_input":·"2025-02-05T04:35:32.973697Z",
57 ····················"iopub.status.busy":·"2025-02-05T04:04:07.385550Z",57 ····················"iopub.status.busy":·"2025-02-05T04:35:32.972137Z",
58 ····················"iopub.status.idle":·"2025-02-05T04:04:07.431012Z",58 ····················"iopub.status.idle":·"2025-02-05T04:35:33.078930Z",
59 ····················"shell.execute_reply":·"2025-02-05T04:04:07.429019Z"59 ····················"shell.execute_reply":·"2025-02-05T04:35:33.075237Z"
60 ················}60 ················}
61 ············},61 ············},
62 ············"outputs":·[62 ············"outputs":·[
63 ················{63 ················{
64 ····················"ename":·"NameError",64 ····················"ename":·"NameError",
65 ····················"evalue":·"name·'xr'·is·not·defined",65 ····················"evalue":·"name·'xr'·is·not·defined",
66 ····················"output_type":·"error",66 ····················"output_type":·"error",
Offset 91, 18 lines modifiedOffset 91, 18 lines modified
91 ············]91 ············]
92 ········},92 ········},
93 ········{93 ········{
94 ············"cell_type":·"code",94 ············"cell_type":·"code",
95 ············"execution_count":·3,95 ············"execution_count":·3,
96 ············"metadata":·{96 ············"metadata":·{
97 ················"execution":·{97 ················"execution":·{
98 ····················"iopub.execute_input":·"2025-02-05T04:04:07.438997Z",98 ····················"iopub.execute_input":·"2025-02-05T04:35:33.093356Z",
99 ····················"iopub.status.busy":·"2025-02-05T04:04:07.438330Z",99 ····················"iopub.status.busy":·"2025-02-05T04:35:33.091839Z",
100 ····················"iopub.status.idle":·"2025-02-05T04:04:07.497559Z",100 ····················"iopub.status.idle":·"2025-02-05T04:35:33.230027Z",
101 ····················"shell.execute_reply":·"2025-02-05T04:04:07.495818Z"101 ····················"shell.execute_reply":·"2025-02-05T04:35:33.226413Z"
102 ················}102 ················}
103 ············},103 ············},
104 ············"outputs":·[104 ············"outputs":·[
105 ················{105 ················{
106 ····················"ename":·"NameError",106 ····················"ename":·"NameError",
107 ····················"evalue":·"name·'ds'·is·not·defined",107 ····················"evalue":·"name·'ds'·is·not·defined",
108 ····················"output_type":·"error",108 ····················"output_type":·"error",
Offset 144, 18 lines modifiedOffset 144, 18 lines modified
144 ············]144 ············]
145 ········},145 ········},
146 ········{146 ········{
147 ············"cell_type":·"code",147 ············"cell_type":·"code",
148 ············"execution_count":·4,148 ············"execution_count":·4,
149 ············"metadata":·{149 ············"metadata":·{
150 ················"execution":·{150 ················"execution":·{
151 ····················"iopub.execute_input":·"2025-02-05T04:04:07.506132Z",151 ····················"iopub.execute_input":·"2025-02-05T04:35:33.244357Z",
152 ····················"iopub.status.busy":·"2025-02-05T04:04:07.505438Z",152 ····················"iopub.status.busy":·"2025-02-05T04:35:33.242840Z",
153 ····················"iopub.status.idle":·"2025-02-05T04:04:07.567562Z",153 ····················"iopub.status.idle":·"2025-02-05T04:35:33.401322Z",
154 ····················"shell.execute_reply":·"2025-02-05T04:04:07.565936Z"154 ····················"shell.execute_reply":·"2025-02-05T04:35:33.397772Z"
155 ················}155 ················}
156 ············},156 ············},
157 ············"outputs":·[157 ············"outputs":·[
158 ················{158 ················{
159 ····················"ename":·"NameError",159 ····················"ename":·"NameError",
160 ····················"evalue":·"name·'ds'·is·not·defined",160 ····················"evalue":·"name·'ds'·is·not·defined",
161 ····················"output_type":·"error",161 ····················"output_type":·"error",
Offset 208, 18 lines modifiedOffset 208, 18 lines modified
208 ············]208 ············]
209 ········},209 ········},
210 ········{210 ········{
211 ············"cell_type":·"code",211 ············"cell_type":·"code",
212 ············"execution_count":·5,212 ············"execution_count":·5,
213 ············"metadata":·{213 ············"metadata":·{
214 ················"execution":·{214 ················"execution":·{
215 ····················"iopub.execute_input":·"2025-02-05T04:04:07.575101Z",215 ····················"iopub.execute_input":·"2025-02-05T04:35:33.415681Z",
216 ····················"iopub.status.busy":·"2025-02-05T04:04:07.574143Z",216 ····················"iopub.status.busy":·"2025-02-05T04:35:33.414164Z",
217 ····················"iopub.status.idle":·"2025-02-05T04:04:07.630535Z",217 ····················"iopub.status.idle":·"2025-02-05T04:35:33.555305Z",
218 ····················"shell.execute_reply":·"2025-02-05T04:04:07.628671Z"218 ····················"shell.execute_reply":·"2025-02-05T04:35:33.551431Z"
219 ················}219 ················}
220 ············},220 ············},
221 ············"outputs":·[221 ············"outputs":·[
222 ················{222 ················{
223 ····················"ename":·"NameError",223 ····················"ename":·"NameError",
224 ····················"evalue":·"name·'ds'·is·not·defined",224 ····················"evalue":·"name·'ds'·is·not·defined",
225 ····················"output_type":·"error",225 ····················"output_type":·"error",
Offset 264, 18 lines modifiedOffset 264, 18 lines modified
264 ············]264 ············]
265 ········},265 ········},
266 ········{266 ········{
267 ············"cell_type":·"code",267 ············"cell_type":·"code",
268 ············"execution_count":·6,268 ············"execution_count":·6,
269 ············"metadata":·{269 ············"metadata":·{
270 ················"execution":·{270 ················"execution":·{
271 ····················"iopub.execute_input":·"2025-02-05T04:04:07.637796Z",271 ····················"iopub.execute_input":·"2025-02-05T04:35:33.569980Z",
272 ····················"iopub.status.busy":·"2025-02-05T04:04:07.637134Z",272 ····················"iopub.status.busy":·"2025-02-05T04:35:33.568381Z",
273 ····················"iopub.status.idle":·"2025-02-05T04:04:07.697220Z",273 ····················"iopub.status.idle":·"2025-02-05T04:35:33.707489Z",
274 ····················"shell.execute_reply":·"2025-02-05T04:04:07.695332Z"274 ····················"shell.execute_reply":·"2025-02-05T04:35:33.703730Z"
275 ················}275 ················}
276 ············},276 ············},
277 ············"outputs":·[277 ············"outputs":·[
278 ················{278 ················{
279 ····················"ename":·"NameError",279 ····················"ename":·"NameError",
280 ····················"evalue":·"name·'ds'·is·not·defined",280 ····················"evalue":·"name·'ds'·is·not·defined",
281 ····················"output_type":·"error",281 ····················"output_type":·"error",
14.9 KB
./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
14.8 KB
weather-data.ipynb
14.8 KB
Pretty-printed
Similarity: 0.9992476851851853% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-02-05T04:35:44.783056Z', " "'iopub.status.busy': '2025-02-05T04:35:44.781153Z', 'iopub.status.idle': " "'2025-02-05T04:35:55.765222Z', 'shell.execute_reply': " "'2025-02-05T04:35:55.760878Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-05T04:35:55.781682Z', 'iopub.status.busy': " "'2025-02-05T04:35:55.780015Z', 'iopub.status.idle': '2025-02-05T04:35:5 […]
    
Offset 15, 18 lines modifiedOffset 15, 18 lines modified
15 ············"execution_count":·1,15 ············"execution_count":·1,
16 ············"metadata":·{16 ············"metadata":·{
17 ················"ExecuteTime":·{17 ················"ExecuteTime":·{
18 ····················"end_time":·"2020-01-27T15:43:36.127628Z",18 ····················"end_time":·"2020-01-27T15:43:36.127628Z",
19 ····················"start_time":·"2020-01-27T15:43:36.081733Z"19 ····················"start_time":·"2020-01-27T15:43:36.081733Z"
20 ················},20 ················},
21 ················"execution":·{21 ················"execution":·{
22 ····················"iopub.execute_input":·"2025-02-05T04:04:19.971701Z",22 ····················"iopub.execute_input":·"2025-02-05T04:35:44.783056Z",
23 ····················"iopub.status.busy":·"2025-02-05T04:04:19.970954Z",23 ····················"iopub.status.busy":·"2025-02-05T04:35:44.781153Z",
24 ····················"iopub.status.idle":·"2025-02-05T04:04:38.907361Z",24 ····················"iopub.status.idle":·"2025-02-05T04:35:55.765222Z",
25 ····················"shell.execute_reply":·"2025-02-05T04:04:38.905509Z"25 ····················"shell.execute_reply":·"2025-02-05T04:35:55.760878Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"ename":·"ModuleNotFoundError",30 ····················"ename":·"ModuleNotFoundError",
31 ····················"evalue":·"No·module·named·'xarray'",31 ····················"evalue":·"No·module·named·'xarray'",
32 ····················"output_type":·"error",32 ····················"output_type":·"error",
Offset 86, 18 lines modifiedOffset 86, 18 lines modified
86 ············"execution_count":·2,86 ············"execution_count":·2,
87 ············"metadata":·{87 ············"metadata":·{
88 ················"ExecuteTime":·{88 ················"ExecuteTime":·{
89 ····················"end_time":·"2020-01-27T15:47:14.160297Z",89 ····················"end_time":·"2020-01-27T15:47:14.160297Z",
90 ····················"start_time":·"2020-01-27T15:47:14.126738Z"90 ····················"start_time":·"2020-01-27T15:47:14.126738Z"
91 ················},91 ················},
92 ················"execution":·{92 ················"execution":·{
93 ····················"iopub.execute_input":·"2025-02-05T04:04:38.914396Z",93 ····················"iopub.execute_input":·"2025-02-05T04:35:55.781682Z",
94 ····················"iopub.status.busy":·"2025-02-05T04:04:38.913089Z",94 ····················"iopub.status.busy":·"2025-02-05T04:35:55.780015Z",
95 ····················"iopub.status.idle":·"2025-02-05T04:04:38.961840Z",95 ····················"iopub.status.idle":·"2025-02-05T04:35:55.895686Z",
96 ····················"shell.execute_reply":·"2025-02-05T04:04:38.959866Z"96 ····················"shell.execute_reply":·"2025-02-05T04:35:55.891556Z"
97 ················}97 ················}
98 ············},98 ············},
99 ············"outputs":·[99 ············"outputs":·[
100 ················{100 ················{
101 ····················"ename":·"NameError",101 ····················"ename":·"NameError",
102 ····················"evalue":·"name·'ds'·is·not·defined",102 ····················"evalue":·"name·'ds'·is·not·defined",
103 ····················"output_type":·"error",103 ····················"output_type":·"error",
Offset 119, 18 lines modifiedOffset 119, 18 lines modified
119 ············"execution_count":·3,119 ············"execution_count":·3,
120 ············"metadata":·{120 ············"metadata":·{
121 ················"ExecuteTime":·{121 ················"ExecuteTime":·{
122 ····················"end_time":·"2020-01-27T15:47:32.682065Z",122 ····················"end_time":·"2020-01-27T15:47:32.682065Z",
123 ····················"start_time":·"2020-01-27T15:47:32.652629Z"123 ····················"start_time":·"2020-01-27T15:47:32.652629Z"
124 ················},124 ················},
125 ················"execution":·{125 ················"execution":·{
126 ····················"iopub.execute_input":·"2025-02-05T04:04:38.968776Z",126 ····················"iopub.execute_input":·"2025-02-05T04:35:55.910827Z",
127 ····················"iopub.status.busy":·"2025-02-05T04:04:38.967249Z",127 ····················"iopub.status.busy":·"2025-02-05T04:35:55.908997Z",
128 ····················"iopub.status.idle":·"2025-02-05T04:04:39.013550Z",128 ····················"iopub.status.idle":·"2025-02-05T04:35:56.024737Z",
129 ····················"shell.execute_reply":·"2025-02-05T04:04:39.011661Z"129 ····················"shell.execute_reply":·"2025-02-05T04:35:56.020006Z"
130 ················}130 ················}
131 ············},131 ············},
132 ············"outputs":·[132 ············"outputs":·[
133 ················{133 ················{
134 ····················"ename":·"NameError",134 ····················"ename":·"NameError",
135 ····················"evalue":·"name·'df'·is·not·defined",135 ····················"evalue":·"name·'df'·is·not·defined",
136 ····················"output_type":·"error",136 ····················"output_type":·"error",
Offset 158, 18 lines modifiedOffset 158, 18 lines modified
158 ············"execution_count":·4,158 ············"execution_count":·4,
159 ············"metadata":·{159 ············"metadata":·{
160 ················"ExecuteTime":·{160 ················"ExecuteTime":·{
161 ····················"end_time":·"2020-01-27T15:47:34.617042Z",161 ····················"end_time":·"2020-01-27T15:47:34.617042Z",
162 ····················"start_time":·"2020-01-27T15:47:34.282605Z"162 ····················"start_time":·"2020-01-27T15:47:34.282605Z"
163 ················},163 ················},
164 ················"execution":·{164 ················"execution":·{
165 ····················"iopub.execute_input":·"2025-02-05T04:04:39.019639Z",165 ····················"iopub.execute_input":·"2025-02-05T04:35:56.040588Z",
166 ····················"iopub.status.busy":·"2025-02-05T04:04:39.018979Z",166 ····················"iopub.status.busy":·"2025-02-05T04:35:56.038965Z",
167 ····················"iopub.status.idle":·"2025-02-05T04:04:39.077219Z",167 ····················"iopub.status.idle":·"2025-02-05T04:35:56.155949Z",
168 ····················"shell.execute_reply":·"2025-02-05T04:04:39.075390Z"168 ····················"shell.execute_reply":·"2025-02-05T04:35:56.151930Z"
169 ················}169 ················}
170 ············},170 ············},
171 ············"outputs":·[171 ············"outputs":·[
172 ················{172 ················{
173 ····················"ename":·"NameError",173 ····················"ename":·"NameError",
174 ····················"evalue":·"name·'ds'·is·not·defined",174 ····················"evalue":·"name·'ds'·is·not·defined",
175 ····················"output_type":·"error",175 ····················"output_type":·"error",
Offset 197, 18 lines modifiedOffset 197, 18 lines modified
197 ············"execution_count":·5,197 ············"execution_count":·5,
198 ············"metadata":·{198 ············"metadata":·{
199 ················"ExecuteTime":·{199 ················"ExecuteTime":·{
200 ····················"end_time":·"2020-01-27T15:47:37.643175Z",200 ····················"end_time":·"2020-01-27T15:47:37.643175Z",
201 ····················"start_time":·"2020-01-27T15:47:37.202479Z"201 ····················"start_time":·"2020-01-27T15:47:37.202479Z"
202 ················},202 ················},
203 ················"execution":·{203 ················"execution":·{
204 ····················"iopub.execute_input":·"2025-02-05T04:04:39.084729Z",204 ····················"iopub.execute_input":·"2025-02-05T04:35:56.171603Z",
205 ····················"iopub.status.busy":·"2025-02-05T04:04:39.084054Z",205 ····················"iopub.status.busy":·"2025-02-05T04:35:56.170040Z",
206 ····················"iopub.status.idle":·"2025-02-05T04:04:39.131951Z",206 ····················"iopub.status.idle":·"2025-02-05T04:35:56.288108Z",
207 ····················"shell.execute_reply":·"2025-02-05T04:04:39.130341Z"207 ····················"shell.execute_reply":·"2025-02-05T04:35:56.283936Z"
208 ················}208 ················}
209 ············},209 ············},
210 ············"outputs":·[210 ············"outputs":·[
211 ················{211 ················{
212 ····················"ename":·"NameError",212 ····················"ename":·"NameError",
213 ····················"evalue":·"name·'df'·is·not·defined",213 ····················"evalue":·"name·'df'·is·not·defined",
214 ····················"output_type":·"error",214 ····················"output_type":·"error",
Offset 236, 18 lines modifiedOffset 236, 18 lines modified
236 ············"execution_count":·6,236 ············"execution_count":·6,
237 ············"metadata":·{237 ············"metadata":·{
238 ················"ExecuteTime":·{238 ················"ExecuteTime":·{
239 ····················"end_time":·"2020-01-27T15:48:11.241224Z",239 ····················"end_time":·"2020-01-27T15:48:11.241224Z",
240 ····················"start_time":·"2020-01-27T15:48:11.211156Z"240 ····················"start_time":·"2020-01-27T15:48:11.211156Z"
241 ················},241 ················},
242 ················"execution":·{242 ················"execution":·{
243 ····················"iopub.execute_input":·"2025-02-05T04:04:39.138949Z",243 ····················"iopub.execute_input":·"2025-02-05T04:35:56.304203Z",
244 ····················"iopub.status.busy":·"2025-02-05T04:04:39.138324Z",244 ····················"iopub.status.busy":·"2025-02-05T04:35:56.302606Z",
245 ····················"iopub.status.idle":·"2025-02-05T04:04:39.196345Z",245 ····················"iopub.status.idle":·"2025-02-05T04:35:56.424121Z",
246 ····················"shell.execute_reply":·"2025-02-05T04:04:39.194690Z"246 ····················"shell.execute_reply":·"2025-02-05T04:35:56.419946Z"
247 ················}247 ················}
248 ············},248 ············},
249 ············"outputs":·[249 ············"outputs":·[
250 ················{250 ················{
251 ····················"ename":·"NameError",251 ····················"ename":·"NameError",
252 ····················"evalue":·"name·'ds'·is·not·defined",252 ····················"evalue":·"name·'ds'·is·not·defined",
253 ····················"output_type":·"error",253 ····················"output_type":·"error",
Offset 269, 18 lines modifiedOffset 269, 18 lines modified
269 ············"execution_count":·7,269 ············"execution_count":·7,
270 ············"metadata":·{270 ············"metadata":·{
271 ················"ExecuteTime":·{271 ················"ExecuteTime":·{
272 ····················"end_time":·"2020-01-27T15:48:13.131247Z",272 ····················"end_time":·"2020-01-27T15:48:13.131247Z",
273 ····················"start_time":·"2020-01-27T15:48:12.924985Z"273 ····················"start_time":·"2020-01-27T15:48:12.924985Z"
274 ················},274 ················},
275 ················"execution":·{275 ················"execution":·{
276 ····················"iopub.execute_input":·"2025-02-05T04:04:39.204011Z",276 ····················"iopub.execute_input":·"2025-02-05T04:35:56.439874Z",
277 ····················"iopub.status.busy":·"2025-02-05T04:04:39.203327Z",277 ····················"iopub.status.busy":·"2025-02-05T04:35:56.438252Z",
278 ····················"iopub.status.idle":·"2025-02-05T04:04:39.250912Z",278 ····················"iopub.status.idle":·"2025-02-05T04:35:56.574242Z",
279 ····················"shell.execute_reply":·"2025-02-05T04:04:39.249189Z"279 ····················"shell.execute_reply":·"2025-02-05T04:35:56.558109Z"
280 ················}280 ················}
281 ············},281 ············},
Max diff block lines reached; 6872/14524 bytes (47.31%) of diff not shown.
2.21 KB
./usr/share/doc/python-xarray-doc/html/getting-started-guide/quick-overview.html
    
Offset 324, 15 lines modifiedOffset 324, 15 lines modified
324 </pre></div>324 </pre></div>
325 </div>325 </div>
326 </section>326 </section>
327 <section·id="plotting">327 <section·id="plotting">
328 <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2>328 <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2>
329 <p>Visualizing·your·datasets·is·quick·and·convenient:</p>329 <p>Visualizing·your·datasets·is·quick·and·convenient:</p>
330 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>330 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xeca9bf48&gt;</span>331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xabd838d0&gt;</span>
332 </pre></div>332 </pre></div>
333 </div>333 </div>
334 <img·alt="_build/html/_static/plotting_quick_overview.png"·src="_build/html/_static/plotting_quick_overview.png"·/>334 <img·alt="_build/html/_static/plotting_quick_overview.png"·src="_build/html/_static/plotting_quick_overview.png"·/>
335 <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p>335 <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p>
336 </section>336 </section>
337 <section·id="pandas">337 <section·id="pandas">
338 <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2>338 <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2>
875 B
html2text {}
    
Offset 253, 15 lines modifiedOffset 253, 15 lines modified
253 ·······[0.37342613,·1.49497537,·1.33584385]])253 ·······[0.37342613,·1.49497537,·1.33584385]])
254 Coordinates:254 Coordinates:
255 ··*·x········(x)·int32·8B·10·20255 ··*·x········(x)·int32·8B·10·20
256 Dimensions·without·coordinates:·y256 Dimensions·without·coordinates:·y
257 *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*257 *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
258 Visualizing·your·datasets·is·quick·and·convenient:258 Visualizing·your·datasets·is·quick·and·convenient:
259 In·[37]:·data.plot()259 In·[37]:·data.plot()
260 Out[37]:·<matplotlib.collections.QuadMesh·at·0xeca9bf48>260 Out[37]:·<matplotlib.collections.QuadMesh·at·0xabd838d0>
261 [_build/html/_static/plotting_quick_overview.png]261 [_build/html/_static/plotting_quick_overview.png]
262 Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata262 Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata
263 attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see263 attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see
264 _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g.264 _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g.
265 *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*265 *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
266 Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the266 Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the
267 to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods:267 to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods:
6.73 KB
./usr/share/doc/python-xarray-doc/html/internals/internal-design.html
    
Offset 210, 15 lines modifiedOffset 210, 15 lines modified
210 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>210 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
211 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>211 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
212 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>212 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
213 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>213 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
214 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>214 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
215 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>215 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
216 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.216 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
217 <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>217 <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
218 <span·class="gt">---------------------------------------------------------------------------</span>218 <span·class="gt">---------------------------------------------------------------------------</span>
219 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)219 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)
220 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>220 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>
221 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>221 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
  
Offset 312, 15 lines modifiedOffset 312, 15 lines modified
312 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>312 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
313 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>313 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
314 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>314 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
315 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>315 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
316 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>316 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
317 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>317 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
318 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.318 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
319 <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>319 <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
320 <span·class="gt">---------------------------------------------------------------------------</span>320 <span·class="gt">---------------------------------------------------------------------------</span>
321 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)321 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)
322 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>322 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>
323 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>323 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
  
1.42 KB
html2text {}
    
Offset 159, 15 lines modifiedOffset 159, 15 lines modified
159 ····273·····message.append(159 ····273·····message.append(
160 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different160 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
161 location."161 location."
162 ····275·····)162 ····275·····)
163 -->·276·raise·PermissionError("·".join(message))·from·error163 -->·276·raise·PermissionError("·".join(message))·from·error
  
164 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not164 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
165 create·data·cache·folder·'/nonexistent/first-build/.cache/165 create·data·cache·folder·'/nonexistent/second-build/.cache/
166 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.166 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
167 In·[2]:·var·=·da.variable167 In·[2]:·var·=·da.variable
168 ---------------------------------------------------------------------------168 ---------------------------------------------------------------------------
169 AttributeError····························Traceback·(most·recent·call·last)169 AttributeError····························Traceback·(most·recent·call·last)
170 Cell·In[2],·line·1170 Cell·In[2],·line·1
171 ---->·1·var·=·da.variable171 ---->·1·var·=·da.variable
Offset 260, 15 lines modifiedOffset 260, 15 lines modified
260 ····273·····message.append(260 ····273·····message.append(
261 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different261 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
262 location."262 location."
263 ····275·····)263 ····275·····)
264 -->·276·raise·PermissionError("·".join(message))·from·error264 -->·276·raise·PermissionError("·".join(message))·from·error
  
265 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not265 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
266 create·data·cache·folder·'/nonexistent/first-build/.cache/266 create·data·cache·folder·'/nonexistent/second-build/.cache/
267 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.267 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
268 In·[8]:·var·=·da.variable268 In·[8]:·var·=·da.variable
269 ---------------------------------------------------------------------------269 ---------------------------------------------------------------------------
270 AttributeError····························Traceback·(most·recent·call·last)270 AttributeError····························Traceback·(most·recent·call·last)
271 Cell·In[8],·line·1271 Cell·In[8],·line·1
272 ---->·1·var·=·da.variable272 ---->·1·var·=·da.variable
4.83 KB
./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html
    
Offset 163, 23 lines modifiedOffset 163, 23 lines modified
163 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>163 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
164 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>164 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
165 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>165 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
166 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>166 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
167 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>167 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
168 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>168 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
169 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.169 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
170 <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>170 <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe59ecf58&gt;</span>171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa4da0f10&gt;</span>
  
172 <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">)</span>172 <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">)</span>
  
173 <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">))</span>173 <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">))</span>
174 <span·class="go">[&#39;longitude&#39;,·&#39;.zgroup&#39;,·&#39;.zattrs&#39;,·&#39;.zmetadata&#39;,·&#39;latitude&#39;]</span>174 <span·class="go">[&#39;.zattrs&#39;,·&#39;.zgroup&#39;,·&#39;latitude&#39;,·&#39;.zmetadata&#39;,·&#39;longitude&#39;]</span>
  
175 <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span>175 <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span>
176 <span·class="go">/</span>176 <span·class="go">/</span>
177 <span·class="go">·├──·latitude·(50,)·float64</span>177 <span·class="go">·├──·latitude·(50,)·float64</span>
178 <span·class="go">·└──·longitude·(50,)·float64</span>178 <span·class="go">·└──·longitude·(50,)·float64</span>
  
179 <span·class="gp">In·[9]:·</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">attrs</span><span·class="p">)</span>179 <span·class="gp">In·[9]:·</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">attrs</span><span·class="p">)</span>
1010 B
html2text {}
    
Offset 111, 24 lines modifiedOffset 111, 24 lines modified
111 ····273·····message.append(111 ····273·····message.append(
112 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different112 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
113 location."113 location."
114 ····275·····)114 ····275·····)
115 -->·276·raise·PermissionError("·".join(message))·from·error115 -->·276·raise·PermissionError("·".join(message))·from·error
  
116 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not116 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
117 create·data·cache·folder·'/nonexistent/first-build/.cache/117 create·data·cache·folder·'/nonexistent/second-build/.cache/
118 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.118 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
119 In·[5]:·ds.to_zarr("rasm.zarr",·mode="w")119 In·[5]:·ds.to_zarr("rasm.zarr",·mode="w")
120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xe59ecf58>120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xa4da0f10>
  
121 In·[6]:·zgroup·=·zarr.open("rasm.zarr")121 In·[6]:·zgroup·=·zarr.open("rasm.zarr")
  
122 In·[7]:·print(os.listdir("rasm.zarr"))122 In·[7]:·print(os.listdir("rasm.zarr"))
123 ['longitude',·'.zgroup',·'.zattrs',·'.zmetadata',·'latitude']123 ['.zattrs',·'.zgroup',·'latitude',·'.zmetadata',·'longitude']
  
124 In·[8]:·print(zgroup.tree())124 In·[8]:·print(zgroup.tree())
125 /125 /
126 ·├──·latitude·(50,)·float64126 ·├──·latitude·(50,)·float64
127 ·└──·longitude·(50,)·float64127 ·└──·longitude·(50,)·float64
  
128 In·[9]:·dict(zgroup["Tair"].attrs)128 In·[9]:·dict(zgroup["Tair"].attrs)
52.5 KB
./usr/share/doc/python-xarray-doc/html/searchindex.js
52.4 KB
js-beautify {}
    
Offset 2352, 40 lines modifiedOffset 2352, 40 lines modified
2352 ········"3":·"py:property",2352 ········"3":·"py:property",
2353 ········"4":·"py:attribute",2353 ········"4":·"py:attribute",
2354 ········"5":·"py:function"2354 ········"5":·"py:function"
2355 ····},2355 ····},
2356 ····"terms":·{2356 ····"terms":·{
2357 ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52],2357 ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52],
2358 ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53],2358 ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53],
2359 ········"00":·[36,·37,·38,·45,·47,·52,·53,·54],2359 ········"00":·[36,·37,·38,·45,·47,·51,·52,·53,·54],
2360 ········"000000":·16,2360 ········"000000":·16,
2361 ········"000000000":·[37,·38,·52],2361 ········"000000000":·[37,·38,·52],
2362 ········"0001":·[53,·54],2362 ········"0001":·[53,·54],
2363 ········"00010101":·53,2363 ········"00010101":·53,
2364 ········"00010201":·53,2364 ········"00010201":·53,
2365 ········"00010301":·53,2365 ········"00010301":·53,
2366 ········"0002":·53,2366 ········"0002":·53,
2367 ········"00021001":·53,2367 ········"00021001":·53,
2368 ········"00021101":·53,2368 ········"00021101":·53,
2369 ········"00021201":·53,2369 ········"00021201":·53,
2370 ········"000e":·48,2370 ········"000e":·[48,·51],
2371 ········"001e":·37,2371 ········"001e":·37,
2372 ········"005036":·40,2372 ········"005036":·40,
2373 ········"005e":·37,2373 ········"005e":·37,
2374 ········"00688889":·36,2374 ········"00688889":·36,
2375 ········"006e":·37,2375 ········"006e":·37,
2376 ········"008":·51, 
2377 ········"00914929":·36,2376 ········"00914929":·36,
2378 ········"00941742":·36,2377 ········"00941742":·36,
2379 ········"00968205":·36,2378 ········"00968205":·36,
2380 ········"00973567":·36,2379 ········"00973567":·36,
 2380 ········"00e":·51,
 2381 ········"00j":·51,
2381 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53],2382 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53],
2382 ········"01082401":·36,2383 ········"01082401":·36,
2383 ········"01183847":·36,2384 ········"01183847":·36,
2384 ········"016":·51, 
2385 ········"01636376":·36,2385 ········"01636376":·36,
2386 ········"01652688":·36,2386 ········"01652688":·36,
2387 ········"01652764":·36,2387 ········"01652764":·36,
2388 ········"0165891":·36,2388 ········"0165891":·36,
2389 ········"01670071":·36,2389 ········"01670071":·36,
2390 ········"01670121":·36,2390 ········"01670121":·36,
2391 ········"01671269":·36,2391 ········"01671269":·36,
Offset 2395, 23 lines modifiedOffset 2395, 25 lines modified
2395 ········"01806694":·36,2395 ········"01806694":·36,
2396 ········"01814439":·36,2396 ········"01814439":·36,
2397 ········"0182217":·36,2397 ········"0182217":·36,
2398 ········"018e":·37,2398 ········"018e":·37,
2399 ········"019":·40,2399 ········"019":·40,
2400 ········"01906":·48,2400 ········"01906":·48,
2401 ········"019e":·37,2401 ········"019e":·37,
 2402 ········"01j":·51,
2402 ········"01t00":·[37,·38,·52,·54],2403 ········"01t00":·[37,·38,·52,·54],
2403 ········"01t03":·52,2404 ········"01t03":·52,
2404 ········"01t12":·52,2405 ········"01t12":·52,
2405 ········"02":·[11,·36,·37,·38,·41,·43,·44,·45,·48,·52,·53],2406 ········"02":·[11,·36,·37,·38,·41,·43,·44,·45,·48,·52,·53],
2406 ········"020e":·37,2407 ········"020e":·37,
2407 ········"021e":·[37,·45],2408 ········"021e":·[37,·45],
2408 ········"023e":·37,2409 ········"023e":·37,
2409 ········"024e":·[37,·45],2410 ········"024e":·[37,·45],
2410 ········"026e":·37,2411 ········"026e":·37,
 2412 ········"027456707":·51,
2411 ········"02756784":·19,2413 ········"02756784":·19,
2412 ········"029e":·48,2414 ········"029e":·48,
2413 ········"02t00":·[37,·38],2415 ········"02t00":·[37,·38],
2414 ········"03":·[6,·37,·43,·44,·45,·48,·52,·53],2416 ········"03":·[6,·37,·43,·44,·45,·48,·52,·53],
2415 ········"03047":·48,2417 ········"03047":·48,
2416 ········"031":·41,2418 ········"031":·41,
2417 ········"03333":·44,2419 ········"03333":·44,
Offset 2422, 15 lines modifiedOffset 2424, 15 lines modified
2422 ········"035e":·37,2424 ········"035e":·37,
2423 ········"03611368":·36,2425 ········"03611368":·36,
2424 ········"03626848":·36,2426 ········"03626848":·36,
2425 ········"03642301":·36,2427 ········"03642301":·36,
2426 ········"036e":·48,2428 ········"036e":·48,
2427 ········"0379266750948":·45,2429 ········"0379266750948":·45,
2428 ········"037e":·37,2430 ········"037e":·37,
2429 ········"038":·[43,·51],2431 ········"038":·43,
2430 ········"03835":·41,2432 ········"03835":·41,
2431 ········"03957499":·19,2433 ········"03957499":·19,
2432 ········"03t00":·[37,·38],2434 ········"03t00":·[37,·38],
2433 ········"04":·[19,·36,·37,·38,·41,·43,·47,·52],2435 ········"04":·[19,·36,·37,·38,·41,·43,·47,·52],
2434 ········"04096206":·36,2436 ········"04096206":·36,
2435 ········"04097352":·36,2437 ········"04097352":·36,
2436 ········"040e":·48,2438 ········"040e":·48,
Offset 2449, 14 lines modifiedOffset 2451, 15 lines modified
2449 ········"05":·[36,·38,·45,·48,·52,·53],2451 ········"05":·[36,·38,·45,·48,·52,·53],
2450 ········"05405954":·36,2452 ········"05405954":·36,
2451 ········"05556":·44,2453 ········"05556":·44,
2452 ········"056":·44,2454 ········"056":·44,
2453 ········"057e":·37,2455 ········"057e":·37,
2454 ········"058e":·37,2456 ········"058e":·37,
2455 ········"05912615":·36,2457 ········"05912615":·36,
 2458 ········"05j":·51,
2456 ········"05t00":·37,2459 ········"05t00":·37,
2457 ········"06":·[28,·36,·38,·45,·52],2460 ········"06":·[28,·36,·38,·45,·52],
2458 ········"061":·43,2461 ········"061":·43,
2459 ········"06141":·41,2462 ········"06141":·41,
2460 ········"062":·41,2463 ········"062":·41,
2461 ········"063":·38,2464 ········"063":·38,
2462 ········"06683875":·36,2465 ········"06683875":·36,
Offset 2465, 24 lines modifiedOffset 2468, 25 lines modified
2465 ········"06689":·36,2468 ········"06689":·36,
2466 ········"066e":·[37,·48],2469 ········"066e":·[37,·48],
2467 ········"06732":·41,2470 ········"06732":·41,
2468 ········"067e":·48,2471 ········"067e":·48,
2469 ········"069":·44,2472 ········"069":·44,
2470 ········"06957":·40,2473 ········"06957":·40,
2471 ········"06t00":·37,2474 ········"06t00":·37,
2472 ········"07":·[38,·52,·53],2475 ········"07":·[38,·51,·52,·53],
2473 ········"070e":·37,2476 ········"070e":·37,
2474 ········"07180381":·19,2477 ········"07180381":·19,
2475 ········"071804":·47,2478 ········"071804":·47,
2476 ········"072":·47,2479 ········"072":·47,
2477 ········"072e":·48,2480 ········"072e":·48,
2478 ········"074e":·37,2481 ········"074e":·37,
2479 ········"078":·41,2482 ········"078":·41,
 2483 ········"07j":·51,
2480 ········"07t00":·37,2484 ········"07t00":·37,
2481 ········"08":·[38,·52],2485 ········"08":·[38,·51,·52],
2482 ········"08002":·40,2486 ········"08002":·40,
2483 ········"08172729":·36,2487 ········"08172729":·36,
2484 ········"08203696":·36,2488 ········"08203696":·36,
2485 ········"08285275":·36,2489 ········"08285275":·36,
2486 ········"08299933":·36,2490 ········"08299933":·36,
2487 ········"08305695":·36,2491 ········"08305695":·36,
2488 ········"08341016":·36,2492 ········"08341016":·36,
Offset 2494, 15 lines modifiedOffset 2498, 15 lines modified
Max diff block lines reached; 49999/53644 bytes (93.21%) of diff not shown.
2.39 KB
./usr/share/doc/python-xarray-doc/html/user-guide/computation.html
    
Offset 935, 15 lines modifiedOffset 935, 15 lines modified
935 <span·class="go">Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)</span>935 <span·class="go">Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)</span>
936 <span·class="go">Coordinates:</span>936 <span·class="go">Coordinates:</span>
937 <span·class="go">··*·param··················(param)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>937 <span·class="go">··*·param··················(param)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
938 <span·class="go">··*·cov_i··················(cov_i)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>938 <span·class="go">··*·cov_i··················(cov_i)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
939 <span·class="go">··*·cov_j··················(cov_j)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>939 <span·class="go">··*·cov_j··················(cov_j)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
940 <span·class="go">Data·variables:</span>940 <span·class="go">Data·variables:</span>
941 <span·class="go">····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986</span>941 <span·class="go">····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986</span>
942 <span·class="go">····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.466e-06</span>942 <span·class="go">····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.467e-06</span>
943 </pre></div>943 </pre></div>
944 </div>944 </div>
945 <div·class="admonition·note">945 <div·class="admonition·note">
946 <p·class="admonition-title">Note</p>946 <p·class="admonition-title">Note</p>
947 <p>This·method·replicates·the·behavior·of·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">scipy.optimize.curve_fit()</span></code>.</p>947 <p>This·method·replicates·the·behavior·of·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">scipy.optimize.curve_fit()</span></code>.</p>
948 </div>948 </div>
949 </section>949 </section>
1.1 KB
html2text {}
    
Offset 776, 15 lines modifiedOffset 776, 15 lines modified
776 Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)776 Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)
777 Coordinates:777 Coordinates:
778 ··*·param··················(param)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'778 ··*·param··················(param)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
779 ··*·cov_i··················(cov_i)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'779 ··*·cov_i··················(cov_i)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
780 ··*·cov_j··················(cov_j)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'780 ··*·cov_j··················(cov_j)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
781 Data·variables:781 Data·variables:
782 ····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986782 ····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986
783 ····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.466e-06783 ····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.467e-06
784 Note784 Note
785 This·method·replicates·the·behavior·of·scipy.optimize.curve_fit().785 This·method·replicates·the·behavior·of·scipy.optimize.curve_fit().
786 *\x8**\x8**\x8**\x8**\x8*·B\x8Br\x8ro\x8oa\x8ad\x8dc\x8ca\x8as\x8st\x8ti\x8in\x8ng\x8g·b\x8by\x8y·d\x8di\x8im\x8me\x8en\x8ns\x8si\x8io\x8on\x8n·n\x8na\x8am\x8me\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*786 *\x8**\x8**\x8**\x8**\x8*·B\x8Br\x8ro\x8oa\x8ad\x8dc\x8ca\x8as\x8st\x8ti\x8in\x8ng\x8g·b\x8by\x8y·d\x8di\x8im\x8me\x8en\x8ns\x8si\x8io\x8on\x8n·n\x8na\x8am\x8me\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
787 DataArray·objects·automatically·align·themselves·(“broadcasting”·in·the·numpy787 DataArray·objects·automatically·align·themselves·(“broadcasting”·in·the·numpy
788 parlance)·by·dimension·name·instead·of·axis·order.·With·xarray,·you·do·not·need788 parlance)·by·dimension·name·instead·of·axis·order.·With·xarray,·you·do·not·need
789 to·transpose·arrays·or·insert·dimensions·of·length·1·to·get·array·operations·to789 to·transpose·arrays·or·insert·dimensions·of·length·1·to·get·array·operations·to
790 work,·as·commonly·done·in·numpy·with·numpy.reshape()·or·numpy.newaxis.790 work,·as·commonly·done·in·numpy·with·numpy.reshape()·or·numpy.newaxis.
4.95 KB
./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html
    
Offset 731, 18 lines modifiedOffset 731, 18 lines modified
731 a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of731 a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of
732 simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for732 simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for
733 transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to733 transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to
734 follow·nested·function·calls:</p>734 follow·nested·function·calls:</p>
735 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span>735 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span>
736 <span·class="go">#·entirely·from·left·to·right</span>736 <span·class="go">#·entirely·from·left·to·right</span>
737 <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">))</span>737 <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">))</span>
738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xe453e500&gt;]</span>738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa41923a0&gt;]</span>
  
739 <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span>739 <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span>
740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xe4518190&gt;]</span>740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa4192030&gt;]</span>
741 </pre></div>741 </pre></div>
742 </div>742 </div>
743 <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names743 <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names
744 (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and744 (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and
745 <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p>745 <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p>
746 <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if746 <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if
747 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead747 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead
1.33 KB
html2text {}
    
Offset 585, 19 lines modifiedOffset 585, 19 lines modified
585 There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an585 There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an
586 external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g.,586 external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g.,
587 func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using587 func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using
588 “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls:588 “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls:
589 #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow589 #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow
590 #·entirely·from·left·to·right590 #·entirely·from·left·to·right
591 In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument"))591 In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument"))
592 Out[64]:·[<matplotlib.lines.Line2D·at·0xe453e500>]592 Out[64]:·[<matplotlib.lines.Line2D·at·0xa41923a0>]
  
593 In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean593 In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean
594 ("instrument").pipe(plt.plot))594 ("instrument").pipe(plt.plot))
595 Out[65]:·[<matplotlib.lines.Line2D·at·0xe4518190>]595 Out[65]:·[<matplotlib.lines.Line2D·at·0xa4192030>]
596 Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names596 Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names
597 (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n).597 (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n).
598 With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if598 With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if
599 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead599 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead
600 of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we600 of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we
601 encourage·using·this·approach.601 encourage·using·this·approach.
602 *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*602 *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
3.71 KB
./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html
    
Offset 982, 15 lines modifiedOffset 982, 15 lines modified
982 <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to!982 <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to!
983 In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter.983 In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter.
984 This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p>984 This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p>
985 </div>985 </div>
986 <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p>986 <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p>
987 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span>987 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span>
988 <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span>988 <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span>
989 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>989 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
990 <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;D&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>990 <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;D&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
991 <span·class="go">KeyError:·&quot;No·variable·named·&#39;time&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;,·&#39;letters&#39;]&quot;</span>991 <span·class="go">KeyError:·&quot;No·variable·named·&#39;time&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;,·&#39;letters&#39;]&quot;</span>
  
  
992 <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;W&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>992 <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;W&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
860 B
html2text {}
    
Offset 868, 15 lines modifiedOffset 868, 15 lines modified
868 model·is·now·slightly·stricter.·This·allows·us·to·provide·features·like868 model·is·now·slightly·stricter.·This·allows·us·to·provide·features·like
869 _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e.869 _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e.
870 To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not870 To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not
871 aligned·with·one·another:871 aligned·with·one·another:
872 #·(drop·the·attributes·just·to·make·the·printed·representation·shorter)872 #·(drop·the·attributes·just·to·make·the·printed·representation·shorter)
873 In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs()873 In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs()
874 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not874 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
875 create·data·cache·folder·'/nonexistent/first-build/.cache/875 create·data·cache·folder·'/nonexistent/second-build/.cache/
876 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.876 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
877 In·[90]:·ds_daily·=·ds.resample(time="D").mean("time")877 In·[90]:·ds_daily·=·ds.resample(time="D").mean("time")
878 KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',878 KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',
879 'x',·'letters']"879 'x',·'letters']"
  
9.12 KB
./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html
    
Offset 653, 15 lines modifiedOffset 653, 15 lines modified
653 to·a·collection·specified·weather·station·latitudes·and·longitudes.653 to·a·collection·specified·weather·station·latitudes·and·longitudes.
654 To·trigger·vectorized·indexing·behavior654 To·trigger·vectorized·indexing·behavior
655 you·will·need·to·provide·the·selection·dimensions·with·a·new655 you·will·need·to·provide·the·selection·dimensions·with·a·new
656 shared·output·dimension·name.·In·the·example·below,·the·selections656 shared·output·dimension·name.·In·the·example·below,·the·selections
657 of·the·closest·latitude·and·longitude·are·renamed·to·an·output657 of·the·closest·latitude·and·longitude·are·renamed·to·an·output
658 dimension·named·“points”:</p>658 dimension·named·“points”:</p>
659 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>659 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
660 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>660 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
661 <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span>661 <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span>
662 <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>662 <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>
  
663 <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>663 <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>
  
Offset 697, 15 lines modifiedOffset 697, 15 lines modified
697 </div>697 </div>
698 </section>698 </section>
699 <section·id="assigning-values-with-indexing">699 <section·id="assigning-values-with-indexing">
700 <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2>700 <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2>
701 <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you701 <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you
702 can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p>702 can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p>
703 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>703 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
704 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>704 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
705 <span·class="go">#·add·an·empty·2D·dataarray</span>705 <span·class="go">#·add·an·empty·2D·dataarray</span>
706 <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;empty&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>706 <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;empty&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>
707 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>707 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>
  
  
Offset 869, 15 lines modifiedOffset 869, 15 lines modified
869 </div>869 </div>
870 </div>870 </div>
871 <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p>871 <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p>
872 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;eraint_uvz&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span>872 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;eraint_uvz&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span>
873 <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span>873 <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span>
874 <span·class="gp">···....:·</span><span·class="p">)</span>874 <span·class="gp">···....:·</span><span·class="p">)</span>
875 <span·class="gp">···....:·</span>875 <span·class="gp">···....:·</span>
876 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>876 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
877 <span·class="go">#·set·all·values·to·0</span>877 <span·class="go">#·set·all·values·to·0</span>
878 <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span>878 <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span>
879 <span·class="go">NameError:·name·&#39;ds_org&#39;·is·not·defined</span>879 <span·class="go">NameError:·name·&#39;ds_org&#39;·is·not·defined</span>
  
  
2.39 KB
html2text {}
    
Offset 474, 15 lines modifiedOffset 474, 15 lines modified
474 collection·specified·weather·station·latitudes·and·longitudes.·To·trigger474 collection·specified·weather·station·latitudes·and·longitudes.·To·trigger
475 vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions475 vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions
476 with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections476 with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections
477 of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named477 of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named
478 “points”:478 “points”:
479 In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature")479 In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature")
480 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not480 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
481 create·data·cache·folder·'/nonexistent/first-build/.cache/481 create·data·cache·folder·'/nonexistent/second-build/.cache/
482 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.482 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
483 #·Define·target·latitude·and·longitude·(where·weather·stations·might·be)483 #·Define·target·latitude·and·longitude·(where·weather·stations·might·be)
484 In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points")484 In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points")
  
485 In·[54]:·target_lat·=·xr.DataArray([31,·41,·42,·42],·dims="points")485 In·[54]:·target_lat·=·xr.DataArray([31,·41,·42,·42],·dims="points")
Offset 513, 15 lines modifiedOffset 513, 15 lines modified
513 selected·subpart·of·the·target·array·(except·for·the·explicitly·indexed513 selected·subpart·of·the·target·array·(except·for·the·explicitly·indexed
514 dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised.514 dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised.
515 *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*515 *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
516 To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing516 To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing
517 with·.loc·:517 with·.loc·:
518 In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature")518 In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature")
519 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not519 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
520 create·data·cache·folder·'/nonexistent/first-build/.cache/520 create·data·cache·folder·'/nonexistent/second-build/.cache/
521 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.521 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
522 #·add·an·empty·2D·dataarray522 #·add·an·empty·2D·dataarray
523 In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0)523 In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0)
524 AttributeError:·'Dataset'·object·has·no·attribute·'air'524 AttributeError:·'Dataset'·object·has·no·attribute·'air'
  
Offset 673, 15 lines modifiedOffset 673, 15 lines modified
673 Dimensions·without·coordinates:·x673 Dimensions·without·coordinates:·x
674 You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once:674 You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once:
675 In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel(675 In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel(
676 ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0676 ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0
677 ···....:·)677 ···....:·)
678 ···....:678 ···....:
679 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not679 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
680 create·data·cache·folder·'/nonexistent/first-build/.cache/680 create·data·cache·folder·'/nonexistent/second-build/.cache/
681 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.681 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
682 #·set·all·values·to·0682 #·set·all·values·to·0
683 In·[84]:·ds·=·xr.zeros_like(ds_org)683 In·[84]:·ds·=·xr.zeros_like(ds_org)
684 NameError:·name·'ds_org'·is·not·defined684 NameError:·name·'ds_org'·is·not·defined
  
9.71 KB
./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html
    
Offset 237, 24 lines modifiedOffset 237, 24 lines modified
237 <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span>237 <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span>
238 <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>238 <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>
239 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span>239 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span>
240 <span·class="gp">···....:·</span><span·class="p">)</span>240 <span·class="gp">···....:·</span><span·class="p">)</span>
241 <span·class="gp">···....:·</span>241 <span·class="gp">···....:·</span>
  
242 <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">&quot;o&quot;</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;original&quot;</span><span·class="p">)</span>242 <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">&quot;o&quot;</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;original&quot;</span><span·class="p">)</span>
243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xeca9eb30&gt;]</span>243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa410fdf0&gt;]</span>
  
244 <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;linear·(default)&quot;</span><span·class="p">)</span>244 <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;linear·(default)&quot;</span><span·class="p">)</span>
245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xeca9ea80&gt;]</span>245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa410fc90&gt;]</span>
  
246 <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span>246 <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span>
247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xeca9e030&gt;]</span>247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xabce7ea0&gt;]</span>
  
248 <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span>248 <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span>
249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0xecaa40e8&gt;</span>249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0xabd83f48&gt;</span>
250 </pre></div>250 </pre></div>
251 </div>251 </div>
252 <a·class="reference·internal·image-reference"·href="_build/html/_static/interpolation_sample1.png"><img·alt="_build/html/_static/interpolation_sample1.png"·src="_build/html/_static/interpolation_sample1.png"·style="width:·4in;"·/>252 <a·class="reference·internal·image-reference"·href="_build/html/_static/interpolation_sample1.png"><img·alt="_build/html/_static/interpolation_sample1.png"·src="_build/html/_static/interpolation_sample1.png"·style="width:·4in;"·/>
253 </a>253 </a>
254 <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p>254 <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p>
255 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span>255 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span>
256 <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;fill_value&quot;</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span>256 <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;fill_value&quot;</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span>
Offset 439, 15 lines modifiedOffset 439, 15 lines modified
439 see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p>439 see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p>
440 </section>440 </section>
441 <section·id="example">441 <section·id="example">
442 <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2>442 <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2>
443 <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p>443 <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p>
444 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span>444 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span>
445 <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>445 <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>
446 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>446 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
447 <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span>447 <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span>
  
448 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span>448 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span>
449 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>449 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>
  
2.04 KB
html2text {}
    
Offset 154, 26 lines modifiedOffset 154, 26 lines modified
154 ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)),154 ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)),
155 ···....:·····dims="x",155 ···....:·····dims="x",
156 ···....:·····coords={"x":·np.linspace(0,·1,·10)},156 ···....:·····coords={"x":·np.linspace(0,·1,·10)},
157 ···....:·)157 ···....:·)
158 ···....:158 ···....:
  
159 In·[17]:·da.plot.line("o",·label="original")159 In·[17]:·da.plot.line("o",·label="original")
160 Out[17]:·[<matplotlib.lines.Line2D·at·0xeca9eb30>]160 Out[17]:·[<matplotlib.lines.Line2D·at·0xa410fdf0>]
  
161 In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear161 In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear
162 (default)")162 (default)")
163 Out[18]:·[<matplotlib.lines.Line2D·at·0xeca9ea80>]163 Out[18]:·[<matplotlib.lines.Line2D·at·0xa410fc90>]
  
164 In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line164 In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line
165 (label="cubic")165 (label="cubic")
166 Out[19]:·[<matplotlib.lines.Line2D·at·0xeca9e030>]166 Out[19]:·[<matplotlib.lines.Line2D·at·0xabce7ea0>]
  
167 In·[20]:·plt.legend()167 In·[20]:·plt.legend()
168 Out[20]:·<matplotlib.legend.Legend·at·0xecaa40e8>168 Out[20]:·<matplotlib.legend.Legend·at·0xabd83f48>
169 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8]169 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8]
170 Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.170 Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.
171 #·fill·0·for·the·outside·of·the·original·coordinates.171 #·fill·0·for·the·outside·of·the·original·coordinates.
172 In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0})172 In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0})
173 Out[21]:173 Out[21]:
174 <xarray.DataArray·(x:·10)>·Size:·80B174 <xarray.DataArray·(x:·10)>·Size:·80B
175 array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···,175 array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···,
Offset 337, 15 lines modifiedOffset 337, 15 lines modified
337 ··*·x········(x)·float64·24B·0.5·1.5·2.5337 ··*·x········(x)·float64·24B·0.5·1.5·2.5
338 For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s.338 For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s.
339 *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*339 *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
340 Let’s·see·how·interp()·works·on·real·data.340 Let’s·see·how·interp()·works·on·real·data.
341 #·Raw·data341 #·Raw·data
342 In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0)342 In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0)
343 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not343 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
344 create·data·cache·folder·'/nonexistent/first-build/.cache/344 create·data·cache·folder·'/nonexistent/second-build/.cache/
345 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.345 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
346 In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4))346 In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4))
  
347 In·[46]:·ds.air.plot(ax=axes[0])347 In·[46]:·ds.air.plot(ax=axes[0])
348 AttributeError:·'Dataset'·object·has·no·attribute·'air'348 AttributeError:·'Dataset'·object·has·no·attribute·'air'
27.7 KB
./usr/share/doc/python-xarray-doc/html/user-guide/io.html
    
Offset 630, 15 lines modifiedOffset 630, 15 lines modified
630 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2000-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span>630 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2000-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span>
631 <span·class="gp">···....:·</span>········<span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">&quot;abcd&quot;</span><span·class="p">)),</span>631 <span·class="gp">···....:·</span>········<span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">&quot;abcd&quot;</span><span·class="p">)),</span>
632 <span·class="gp">···....:·</span>····<span·class="p">},</span>632 <span·class="gp">···....:·</span>····<span·class="p">},</span>
633 <span·class="gp">···....:·</span><span·class="p">)</span>633 <span·class="gp">···....:·</span><span·class="p">)</span>
634 <span·class="gp">···....:·</span>634 <span·class="gp">···....:·</span>
  
635 <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>635 <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>
636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe44296e8&gt;</span>636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3ee8808&gt;</span>
637 </pre></div>637 </pre></div>
638 </div>638 </div>
639 <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives639 <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives
640 there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr640 there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr
641 store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it641 store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it
642 from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing642 from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing
643 store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p>643 store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p>
Offset 724, 36 lines modifiedOffset 724, 36 lines modified
  
724 <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>724 <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>
  
725 <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">&quot;path/to/directory.zarr&quot;</span>725 <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">&quot;path/to/directory.zarr&quot;</span>
  
726 <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span>726 <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span>
727 <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>727 <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>
728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-af35f0e5-ac87-4520-89ac-08ebb43b573c&#39;)</span>728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-7d782aef-6e4b-4cac-b7c4-2b96517da9f0&#39;)</span>
729 </pre></div>729 </pre></div>
730 </div>730 </div>
731 <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that731 <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that
732 can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.732 can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.
733 Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region=&quot;auto&quot;</span></code>·will·open·the·existing·store·and·determine·the733 Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region=&quot;auto&quot;</span></code>·will·open·the·existing·store·and·determine·the
734 correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an734 correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an
735 explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating735 explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating
736 where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p>736 where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p>
737 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we&#39;ll·slice·a·single·dataset,·but·in·the·real·use-case</span>737 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we&#39;ll·slice·a·single·dataset,·but·in·the·real·use-case</span>
738 <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span>738 <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span>
739 <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>739 <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>
  
740 <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span>740 <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span>
741 <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">&quot;auto&quot;</span><span·class="p">)</span>741 <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">&quot;auto&quot;</span><span·class="p">)</span>
742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe47bf610&gt;</span>742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a6f190&gt;</span>
  
743 <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="s2">&quot;auto&quot;</span><span·class="p">})</span>743 <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="s2">&quot;auto&quot;</span><span·class="p">})</span>
744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe47425c8&gt;</span>744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a6a9b8&gt;</span>
  
745 <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span>745 <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span>
746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe49af6e8&gt;</span>746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a6a580&gt;</span>
747 </pre></div>747 </pre></div>
748 </div>748 </div>
749 <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct749 <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct
750 chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p>750 chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p>
751 <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,751 <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,
752 if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have752 if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have
753 dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates)753 dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates)
Offset 769, 15 lines modifiedOffset 769, 15 lines modified
769 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[25]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span>769 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[25]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span>
  
770 <span·class="gp">In·[26]:·</span><span·class="kn">from</span>·<span·class="nn">numcodecs.blosc</span>·<span·class="kn">import</span>·<span·class="n">Blosc</span>770 <span·class="gp">In·[26]:·</span><span·class="kn">from</span>·<span·class="nn">numcodecs.blosc</span>·<span·class="kn">import</span>·<span·class="n">Blosc</span>
  
771 <span·class="gp">In·[27]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">Blosc</span><span·class="p">(</span><span·class="n">cname</span><span·class="o">=</span><span·class="s2">&quot;zstd&quot;</span><span·class="p">,</span>·<span·class="n">clevel</span><span·class="o">=</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="n">shuffle</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span>771 <span·class="gp">In·[27]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">Blosc</span><span·class="p">(</span><span·class="n">cname</span><span·class="o">=</span><span·class="s2">&quot;zstd&quot;</span><span·class="p">,</span>·<span·class="n">clevel</span><span·class="o">=</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="n">shuffle</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span>
  
772 <span·class="gp">In·[28]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;foo.zarr&quot;</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">&quot;compressor&quot;</span><span·class="p">:</span>·<span·class="n">compressor</span><span·class="p">}})</span>772 <span·class="gp">In·[28]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;foo.zarr&quot;</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">&quot;compressor&quot;</span><span·class="p">:</span>·<span·class="n">compressor</span><span·class="p">}})</span>
773 <span·class="gh">Out[28]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe474c808&gt;</span>773 <span·class="gh">Out[28]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a7b2b0&gt;</span>
774 </pre></div>774 </pre></div>
775 </div>775 </div>
776 <div·class="admonition·note">776 <div·class="admonition·note">
777 <p·class="admonition-title">Note</p>777 <p·class="admonition-title">Note</p>
778 <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with778 <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with
779 xarray.</p>779 xarray.</p>
780 </div>780 </div>
Offset 816, 28 lines modifiedOffset 816, 28 lines modified
816 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>816 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>
817 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>817 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>
818 <span·class="gp">···....:·</span>····<span·class="p">},</span>818 <span·class="gp">···....:·</span>····<span·class="p">},</span>
819 <span·class="gp">···....:·</span><span·class="p">)</span>819 <span·class="gp">···....:·</span><span·class="p">)</span>
820 <span·class="gp">···....:·</span>820 <span·class="gp">···....:·</span>
  
821 <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>821 <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>
822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe475d2f8&gt;</span>822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a7b8e0&gt;</span>
  
823 <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span>823 <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span>
824 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;t&quot;</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span>824 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;t&quot;</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span>
825 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span>825 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span>
826 <span·class="gp">···....:·</span>········<span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span>826 <span·class="gp">···....:·</span>········<span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span>
827 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>827 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>
828 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-03&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>828 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-03&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>
829 <span·class="gp">···....:·</span>····<span·class="p">},</span>829 <span·class="gp">···....:·</span>····<span·class="p">},</span>
830 <span·class="gp">···....:·</span><span·class="p">)</span>830 <span·class="gp">···....:·</span><span·class="p">)</span>
831 <span·class="gp">···....:·</span>831 <span·class="gp">···....:·</span>
  
832 <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">&quot;t&quot;</span><span·class="p">)</span>832 <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">&quot;t&quot;</span><span·class="p">)</span>
833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe474cfa0&gt;</span>833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a7ba48&gt;</span>
834 </pre></div>834 </pre></div>
835 </div>835 </div>
836 </section>836 </section>
837 <section·id="specifying-chunks-in-a-zarr-store">837 <section·id="specifying-chunks-in-a-zarr-store">
838 <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3>838 <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3>
839 <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p>839 <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p>
840 <ol·class="arabic·simple">840 <ol·class="arabic·simple">
Offset 861, 15 lines modifiedOffset 861, 15 lines modified
861 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with861 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with
862 differently-ordered·dimensions·within·a·single·Dataset.</p>862 differently-ordered·dimensions·within·a·single·Dataset.</p>
863 </div>863 </div>
864 <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions864 <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions
865 <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,865 <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,
866 and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p>866 and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p>
867 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;rasm&quot;</span><span·class="p">)</span>867 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;rasm&quot;</span><span·class="p">)</span>
868 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>868 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
869 <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span>869 <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span>
870 <span·class="go">KeyError:·&quot;No·variable·named·&#39;Tair&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;]&quot;</span>870 <span·class="go">KeyError:·&quot;No·variable·named·&#39;Tair&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;]&quot;</span>
  
  
871 <span·class="gp">In·[35]:·</span><span·class="n">ds</span>871 <span·class="gp">In·[35]:·</span><span·class="n">ds</span>
Offset 882, 15 lines modifiedOffset 882, 15 lines modified
882 <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span>882 <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span>
883 </pre></div>883 </pre></div>
884 </div>884 </div>
885 <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little885 <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little
886 space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to886 space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to
887 split·them·into·chunks:</p>887 split·them·into·chunks:</p>
888 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>888 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe475e928&gt;</span>889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3a9a3d0&gt;</span>
  
890 <span·class="gp">In·[37]:·</span><span·class="o">!</span><span·class="w">·</span>ls<span·class="w">·</span>-R<span·class="w">·</span>path/to/directory.zarr890 <span·class="gp">In·[37]:·</span><span·class="o">!</span><span·class="w">·</span>ls<span·class="w">·</span>-R<span·class="w">·</span>path/to/directory.zarr
891 <span·class="go">path/to/directory.zarr:</span>891 <span·class="go">path/to/directory.zarr:</span>
892 <span·class="go">foo··x</span>892 <span·class="go">foo··x</span>
  
Max diff block lines reached; 1975/20790 bytes (9.50%) of diff not shown.
7.26 KB
html2text {}
    
Offset 481, 15 lines modifiedOffset 481, 15 lines modified
481 ···....:·········"y":·pd.date_range("2000-01-01",·periods=5),481 ···....:·········"y":·pd.date_range("2000-01-01",·periods=5),
482 ···....:·········"z":·("x",·list("abcd")),482 ···....:·········"z":·("x",·list("abcd")),
483 ···....:·····},483 ···....:·····},
484 ···....:·)484 ···....:·)
485 ···....:485 ···....:
  
486 In·[13]:·ds.to_zarr("path/to/directory.zarr")486 In·[13]:·ds.to_zarr("path/to/directory.zarr")
487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xe44296e8>487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xa3ee8808>
488 (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.)488 (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.)
489 If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already489 If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already
490 present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being490 present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being
491 overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add491 overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add
492 mode='w'·when·invoking·to_zarr().492 mode='w'·when·invoking·to_zarr().
493 DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and493 DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and
494 loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'.494 loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'.
Offset 562, 35 lines modifiedOffset 562, 35 lines modified
  
562 In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)})562 In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)})
  
563 In·[19]:·path·=·"path/to/directory.zarr"563 In·[19]:·path·=·"path/to/directory.zarr"
  
564 #·Now·we·write·the·metadata·without·computing·any·array·values564 #·Now·we·write·the·metadata·without·computing·any·array·values
565 In·[20]:·ds.to_zarr(path,·compute=False)565 In·[20]:·ds.to_zarr(path,·compute=False)
566 Out[20]:·Delayed('_finalize_store-af35f0e5-ac87-4520-89ac-08ebb43b573c')566 Out[20]:·Delayed('_finalize_store-7d782aef-6e4b-4cac-b7c4-2b96517da9f0')
567 Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that567 Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that
568 can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will568 can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will
569 open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data569 open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data
570 with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to570 with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to
571 Python·slice·objects·indicating·where·the·data·should·be·written·(in·index571 Python·slice·objects·indicating·where·the·data·should·be·written·(in·index
572 space,·not·label·space),·e.g.,572 space,·not·label·space),·e.g.,
573 #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case573 #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case
574 #·we·would·create·them·separately·possibly·even·from·separate·processes.574 #·we·would·create·them·separately·possibly·even·from·separate·processes.
575 In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange575 In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange
576 (30)})576 (30)})
  
577 #·Any·of·the·following·region·specifications·are·valid577 #·Any·of·the·following·region·specifications·are·valid
578 In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto")578 In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto")
579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xe47bf610>579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xa3a6f190>
  
580 In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"})580 In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"})
581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xe47425c8>581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xa3a6a9b8>
  
582 In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)})582 In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)})
583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xe49af6e8>583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xa3a6a580>
584 Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks584 Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks
585 in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock).585 in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock).
586 As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,586 As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,
587 if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions587 if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions
588 included·in·region.·Other·variables·(typically·coordinates)·need·to·be588 included·in·region.·Other·variables·(typically·coordinates)·need·to·be
589 explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'.589 explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'.
590 *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*590 *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
Offset 601, 15 lines modifiedOffset 601, 15 lines modified
601 In·[25]:·import·zarr601 In·[25]:·import·zarr
  
602 In·[26]:·from·numcodecs.blosc·import·Blosc602 In·[26]:·from·numcodecs.blosc·import·Blosc
  
603 In·[27]:·compressor·=·Blosc(cname="zstd",·clevel=3,·shuffle=2)603 In·[27]:·compressor·=·Blosc(cname="zstd",·clevel=3,·shuffle=2)
  
604 In·[28]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}})604 In·[28]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}})
605 Out[28]:·<xarray.backends.zarr.ZarrStore·at·0xe474c808>605 Out[28]:·<xarray.backends.zarr.ZarrStore·at·0xa3a7b2b0>
606 Note606 Note
607 Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with607 Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with
608 xarray.608 xarray.
609 *\x8**\x8**\x8**\x8*·M\x8Mo\x8od\x8di\x8if\x8fy\x8yi\x8in\x8ng\x8g·e\x8ex\x8xi\x8is\x8st\x8ti\x8in\x8ng\x8g·Z\x8Za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*609 *\x8**\x8**\x8**\x8*·M\x8Mo\x8od\x8di\x8if\x8fy\x8yi\x8in\x8ng\x8g·e\x8ex\x8xi\x8is\x8st\x8ti\x8in\x8ng\x8g·Z\x8Za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
610 Xarray·supports·several·ways·of·incrementally·writing·variables·to·a·Zarr610 Xarray·supports·several·ways·of·incrementally·writing·variables·to·a·Zarr
611 store.·These·options·are·useful·for·scenarios·when·it·is·infeasible·or611 store.·These·options·are·useful·for·scenarios·when·it·is·infeasible·or
612 undesirable·to·write·your·entire·dataset·at·once.612 undesirable·to·write·your·entire·dataset·at·once.
Offset 635, 28 lines modifiedOffset 635, 28 lines modified
635 ···....:·········"y":·[1,·2,·3,·4,·5],635 ···....:·········"y":·[1,·2,·3,·4,·5],
636 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),636 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),
637 ···....:·····},637 ···....:·····},
638 ···....:·)638 ···....:·)
639 ···....:639 ···....:
  
640 In·[30]:·ds1.to_zarr("path/to/directory.zarr")640 In·[30]:·ds1.to_zarr("path/to/directory.zarr")
641 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xe475d2f8>641 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xa3a7b8e0>
  
642 In·[31]:·ds2·=·xr.Dataset(642 In·[31]:·ds2·=·xr.Dataset(
643 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},643 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},
644 ···....:·····coords={644 ···....:·····coords={
645 ···....:·········"x":·[10,·20,·30,·40],645 ···....:·········"x":·[10,·20,·30,·40],
646 ···....:·········"y":·[1,·2,·3,·4,·5],646 ···....:·········"y":·[1,·2,·3,·4,·5],
647 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),647 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),
648 ···....:·····},648 ···....:·····},
649 ···....:·)649 ···....:·)
650 ···....:650 ···....:
  
651 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")651 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")
652 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xe474cfa0>652 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xa3a7ba48>
653 *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*653 *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*
654 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:654 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:
655 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in655 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in
656 ······Dataset.to_zarr():656 ······Dataset.to_zarr():
657 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays657 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays
658 ···3.·Default·chunk·behavior·determined·by·the·zarr·library658 ···3.·Default·chunk·behavior·determined·by·the·zarr·library
659 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;659 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;
Offset 675, 15 lines modifiedOffset 675, 15 lines modified
675 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with675 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with
676 differently-ordered·dimensions·within·a·single·Dataset.676 differently-ordered·dimensions·within·a·single·Dataset.
677 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',677 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',
678 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-678 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-
679 dimensional·coordinates·xc·and·yc:679 dimensional·coordinates·xc·and·yc:
680 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")680 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")
681 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not681 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
682 create·data·cache·folder·'/nonexistent/first-build/.cache/682 create·data·cache·folder·'/nonexistent/second-build/.cache/
683 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.683 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
684 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})684 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})
685 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',685 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',
686 'x']"686 'x']"
  
Offset 696, 15 lines modifiedOffset 696, 15 lines modified
696 ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29696 ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
697 Data·variables:697 Data·variables:
698 ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29698 ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
699 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very699 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very
700 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr700 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr
701 behavior·is·to·split·them·into·chunks:701 behavior·is·to·split·them·into·chunks:
702 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")702 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")
703 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xe475e928>703 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xa3a9a3d0>
  
704 In·[37]:·!·ls·-R·path/to/directory.zarr704 In·[37]:·!·ls·-R·path/to/directory.zarr
705 path/to/directory.zarr:705 path/to/directory.zarr:
706 foo··x706 foo··x
  
707 path/to/directory.zarr/foo:707 path/to/directory.zarr/foo:
Max diff block lines reached; 768/7406 bytes (10.37%) of diff not shown.
55.3 KB
./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html
    
Offset 100, 15 lines modifiedOffset 100, 15 lines modified
100 <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span>100 <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span>
  
101 <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span>101 <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span>
102 </pre></div>102 </pre></div>
103 </div>103 </div>
104 <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p>104 <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p>
105 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>105 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
106 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>106 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
107 <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span>107 <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span>
108 <span·class="go">NameError:·name·&#39;airtemps&#39;·is·not·defined</span>108 <span·class="go">NameError:·name·&#39;airtemps&#39;·is·not·defined</span>
  
  
109 <span·class="go">#·Convert·to·celsius</span>109 <span·class="go">#·Convert·to·celsius</span>
Offset 445, 15 lines modifiedOffset 445, 15 lines modified
  
445 <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span>445 <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span>
446 <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">])</span>446 <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">])</span>
447 <span·class="go">KeyError:·&#39;lat&#39;</span>447 <span·class="go">KeyError:·&#39;lat&#39;</span>
  
  
448 <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>448 <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xe2def450&gt;]</span>449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa1fd2870&gt;]</span>
450 </pre></div>450 </pre></div>
451 </div>451 </div>
452 <a·class="reference·internal·image-reference"·href="_build/html/_static/plotting_nonuniform_coords.png"><img·alt="_build/html/_static/plotting_nonuniform_coords.png"·src="_build/html/_static/plotting_nonuniform_coords.png"·style="width:·4in;"·/>452 <a·class="reference·internal·image-reference"·href="_build/html/_static/plotting_nonuniform_coords.png"><img·alt="_build/html/_static/plotting_nonuniform_coords.png"·src="_build/html/_static/plotting_nonuniform_coords.png"·style="width:·4in;"·/>
453 </a>453 </a>
454 </section>454 </section>
455 <section·id="other-types-of-plot">455 <section·id="other-types-of-plot">
456 <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4>456 <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4>
Offset 857, 117 lines modifiedOffset 857, 117 lines modified
857 <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span>857 <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span>
858 <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span>858 <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span>
859 <span·class="go">··*·w········(w)·&lt;U5·80B·&#39;one&#39;·&#39;two&#39;·&#39;three&#39;·&#39;five&#39;</span>859 <span·class="go">··*·w········(w)·&lt;U5·80B·&#39;one&#39;·&#39;two&#39;·&#39;three&#39;·&#39;five&#39;</span>
860 <span·class="go">Attributes:</span>860 <span·class="go">Attributes:</span>
861 <span·class="go">····units:····Aunits</span>861 <span·class="go">····units:····Aunits</span>
  
862 <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">)</span>862 <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">)</span>
863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe4c18310&gt;</span>863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa3f813c8&gt;</span>
864 </pre></div>864 </pre></div>
865 </div>865 </div>
866 <img·alt="_build/html/_static/da_A_y.png"·src="_build/html/_static/da_A_y.png"·/>866 <img·alt="_build/html/_static/da_A_y.png"·src="_build/html/_static/da_A_y.png"·/>
867 <p>Same·plot·can·be·displayed·using·the·dataset:</p>867 <p>Same·plot·can·be·displayed·using·the·dataset:</p>
868 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">)</span>868 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">)</span>
869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe2a1bd40&gt;</span>869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1c4a240&gt;</span>
870 </pre></div>870 </pre></div>
871 </div>871 </div>
872 <img·alt="_build/html/_static/ds_A_y.png"·src="_build/html/_static/ds_A_y.png"·/>872 <img·alt="_build/html/_static/ds_A_y.png"·src="_build/html/_static/ds_A_y.png"·/>
873 <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p>873 <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p>
874 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>874 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe2881c90&gt;</span>875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1e18d40&gt;</span>
876 </pre></div>876 </pre></div>
877 </div>877 </div>
878 <img·alt="_build/html/_static/ds_simple_scatter.png"·src="_build/html/_static/ds_simple_scatter.png"·/>878 <img·alt="_build/html/_static/ds_simple_scatter.png"·src="_build/html/_static/ds_simple_scatter.png"·/>
879 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p>879 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p>
880 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>880 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe2a27920&gt;</span>881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1e65450&gt;</span>
882 </pre></div>882 </pre></div>
883 </div>883 </div>
884 <img·alt="_build/html/_static/ds_hue_scatter.png"·src="_build/html/_static/ds_hue_scatter.png"·/>884 <img·alt="_build/html/_static/ds_hue_scatter.png"·src="_build/html/_static/ds_hue_scatter.png"·/>
885 <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p>885 <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p>
886 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>886 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>
887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe2a41500&gt;</span>887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1c22f50&gt;</span>
888 </pre></div>888 </pre></div>
889 </div>889 </div>
890 <img·alt="_build/html/_static/ds_discrete_legend_hue_scatter.png"·src="_build/html/_static/ds_discrete_legend_hue_scatter.png"·/>890 <img·alt="_build/html/_static/ds_discrete_legend_hue_scatter.png"·src="_build/html/_static/ds_discrete_legend_hue_scatter.png"·/>
891 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span>891 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span>
892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe2852870&gt;</span>892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1c425b0&gt;</span>
893 </pre></div>893 </pre></div>
894 </div>894 </div>
895 <img·alt="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·src="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·/>895 <img·alt="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·src="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·/>
896 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.896 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.
897 You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p>897 You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p>
898 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">)</span>898 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">)</span>
899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe27fd0e0&gt;</span>899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa21442f0&gt;</span>
900 </pre></div>900 </pre></div>
901 </div>901 </div>
902 <img·alt="_build/html/_static/ds_hue_size_scatter.png"·src="_build/html/_static/ds_hue_size_scatter.png"·/>902 <img·alt="_build/html/_static/ds_hue_size_scatter.png"·src="_build/html/_static/ds_hue_size_scatter.png"·/>
903 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p>903 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p>
904 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">)</span>904 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">)</span>
905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe68a0240&gt;</span>905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa1bdc7c0&gt;</span>
906 </pre></div>906 </pre></div>
907 </div>907 </div>
908 <img·alt="_build/html/_static/ds_hue_size_scatter_z.png"·src="_build/html/_static/ds_hue_size_scatter_z.png"·/>908 <img·alt="_build/html/_static/ds_hue_size_scatter_z.png"·src="_build/html/_static/ds_hue_size_scatter_z.png"·/>
909 <p>Faceting·is·also·possible</p>909 <p>Faceting·is·also·possible</p>
910 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>910 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xe4733f48&gt;</span>911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa3274030&gt;</span>
912 </pre></div>912 </pre></div>
913 </div>913 </div>
914 <img·alt="_build/html/_static/ds_facet_scatter.png"·src="_build/html/_static/ds_facet_scatter.png"·/>914 <img·alt="_build/html/_static/ds_facet_scatter.png"·src="_build/html/_static/ds_facet_scatter.png"·/>
915 <p>And·adding·the·z-axis</p>915 <p>And·adding·the·z-axis</p>
916 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>916 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xe21e15b0&gt;</span>917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa15b4240&gt;</span>
918 </pre></div>918 </pre></div>
919 </div>919 </div>
920 <img·alt="_build/html/_static/ds_facet_scatter_z.png"·src="_build/html/_static/ds_facet_scatter_z.png"·/>920 <img·alt="_build/html/_static/ds_facet_scatter_z.png"·src="_build/html/_static/ds_facet_scatter_z.png"·/>
921 <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables921 <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables
922 to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p>922 to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p>
923 </section>923 </section>
924 <section·id="quiver">924 <section·id="quiver">
925 <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3>925 <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3>
926 <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p>926 <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p>
927 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>927 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0xecaa43c8&gt;</span>928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0xa4179760&gt;</span>
929 </pre></div>929 </pre></div>
930 </div>930 </div>
931 <img·alt="_build/html/_static/ds_simple_quiver.png"·src="_build/html/_static/ds_simple_quiver.png"·/>931 <img·alt="_build/html/_static/ds_simple_quiver.png"·src="_build/html/_static/ds_simple_quiver.png"·/>
932 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p>932 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p>
933 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span>933 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span>
934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xe4dbd0d8&gt;</span>934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa40aca08&gt;</span>
935 </pre></div>935 </pre></div>
936 </div>936 </div>
937 <img·alt="_build/html/_static/ds_facet_quiver.png"·src="_build/html/_static/ds_facet_quiver.png"·/>937 <img·alt="_build/html/_static/ds_facet_quiver.png"·src="_build/html/_static/ds_facet_quiver.png"·/>
938 <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots.938 <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots.
939 The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p>939 The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p>
940 </section>940 </section>
941 <section·id="streamplot">941 <section·id="streamplot">
942 <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3>942 <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3>
943 <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p>943 <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p>
944 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>944 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0xe1c5e710&gt;</span>945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0xa1afbd40&gt;</span>
946 </pre></div>946 </pre></div>
947 </div>947 </div>
948 <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/>948 <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/>
949 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines.949 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines.
950 Again,·faceting·is·also·possible:</p>950 Again,·faceting·is·also·possible:</p>
Max diff block lines reached; 20932/42704 bytes (49.02%) of diff not shown.
13.5 KB
html2text {}
    
Offset 30, 15 lines modifiedOffset 30, 15 lines modified
  
30 In·[3]:·import·matplotlib.pyplot·as·plt30 In·[3]:·import·matplotlib.pyplot·as·plt
  
31 In·[4]:·import·xarray·as·xr31 In·[4]:·import·xarray·as·xr
32 For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.32 For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.
33 In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature")33 In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature")
34 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not34 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
35 create·data·cache·folder·'/nonexistent/first-build/.cache/35 create·data·cache·folder·'/nonexistent/second-build/.cache/
36 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.36 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
37 In·[6]:·airtemps37 In·[6]:·airtemps
38 NameError:·name·'airtemps'·is·not·defined38 NameError:·name·'airtemps'·is·not·defined
  
  
Offset 292, 15 lines modifiedOffset 292, 15 lines modified
  
292 #·Apply·a·nonlinear·transformation·to·one·of·the·coords292 #·Apply·a·nonlinear·transformation·to·one·of·the·coords
293 In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"])293 In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"])
294 KeyError:·'lat'294 KeyError:·'lat'
  
  
295 In·[51]:·b.plot()295 In·[51]:·b.plot()
296 Out[51]:·[<matplotlib.lines.Line2D·at·0xe2def450>]296 Out[51]:·[<matplotlib.lines.Line2D·at·0xa1fd2870>]
297 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8]297 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8]
298 *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8*298 *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8*
299 There·are·several·other·options·for·plotting·2D·data.299 There·are·several·other·options·for·plotting·2D·data.
300 Contour·plot·using·DataArray.plot.contour()300 Contour·plot·using·DataArray.plot.contour()
301 In·[52]:·air2d.plot.contour()301 In·[52]:·air2d.plot.contour()
302 NameError:·name·'air2d'·is·not·defined302 NameError:·name·'air2d'·is·not·defined
303 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8]303 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8]
Offset 613, 92 lines modifiedOffset 613, 92 lines modified
613 ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0613 ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0
614 ··*·z········(z)·int32·16B·0·1·2·3614 ··*·z········(z)·int32·16B·0·1·2·3
615 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'615 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'
616 Attributes:616 Attributes:
617 ····units:····Aunits617 ····units:····Aunits
  
618 In·[99]:·ds.A.plot.scatter(x="y")618 In·[99]:·ds.A.plot.scatter(x="y")
619 Out[99]:·<matplotlib.collections.PathCollection·at·0xe4c18310>619 Out[99]:·<matplotlib.collections.PathCollection·at·0xa3f813c8>
620 [_build/html/_static/da_A_y.png]620 [_build/html/_static/da_A_y.png]
621 Same·plot·can·be·displayed·using·the·dataset:621 Same·plot·can·be·displayed·using·the·dataset:
622 In·[100]:·ds.plot.scatter(x="y",·y="A")622 In·[100]:·ds.plot.scatter(x="y",·y="A")
623 Out[100]:·<matplotlib.collections.PathCollection·at·0xe2a1bd40>623 Out[100]:·<matplotlib.collections.PathCollection·at·0xa1c4a240>
624 [_build/html/_static/ds_A_y.png]624 [_build/html/_static/ds_A_y.png]
625 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray625 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray
626 In·[101]:·ds.plot.scatter(x="A",·y="B")626 In·[101]:·ds.plot.scatter(x="A",·y="B")
627 Out[101]:·<matplotlib.collections.PathCollection·at·0xe2881c90>627 Out[101]:·<matplotlib.collections.PathCollection·at·0xa1e18d40>
628 [_build/html/_static/ds_simple_scatter.png]628 [_build/html/_static/ds_simple_scatter.png]
629 The·hue·kwarg·lets·you·vary·the·color·by·variable·value629 The·hue·kwarg·lets·you·vary·the·color·by·variable·value
630 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")630 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")
631 Out[102]:·<matplotlib.collections.PathCollection·at·0xe2a27920>631 Out[102]:·<matplotlib.collections.PathCollection·at·0xa1e65450>
632 [_build/html/_static/ds_hue_scatter.png]632 [_build/html/_static/ds_hue_scatter.png]
633 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,633 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,
634 add_colorbar=False.634 add_colorbar=False.
635 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,635 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,
636 add_colorbar=False)636 add_colorbar=False)
637 Out[103]:·<matplotlib.collections.PathCollection·at·0xe2a41500>637 Out[103]:·<matplotlib.collections.PathCollection·at·0xa1c22f50>
638 [_build/html/_static/ds_discrete_legend_hue_scatter.png]638 [_build/html/_static/ds_discrete_legend_hue_scatter.png]
639 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,639 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,
640 add_colorbar=True)640 add_colorbar=True)
641 Out[104]:·<matplotlib.collections.PathCollection·at·0xe2852870>641 Out[104]:·<matplotlib.collections.PathCollection·at·0xa1c425b0>
642 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]642 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]
643 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can643 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can
644 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to644 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to
645 point·sizes.645 point·sizes.
646 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")646 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")
647 Out[105]:·<matplotlib.collections.PathCollection·at·0xe27fd0e0>647 Out[105]:·<matplotlib.collections.PathCollection·at·0xa21442f0>
648 [_build/html/_static/ds_hue_size_scatter.png]648 [_build/html/_static/ds_hue_size_scatter.png]
649 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.649 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.
650 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")650 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")
651 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe68a0240>651 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa1bdc7c0>
652 [_build/html/_static/ds_hue_size_scatter_z.png]652 [_build/html/_static/ds_hue_size_scatter_z.png]
653 Faceting·is·also·possible653 Faceting·is·also·possible
654 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",654 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",
655 col="w")655 col="w")
656 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4733f48>656 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xa3274030>
657 [_build/html/_static/ds_facet_scatter.png]657 [_build/html/_static/ds_facet_scatter.png]
658 And·adding·the·z-axis658 And·adding·the·z-axis
659 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",659 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",
660 row="x",·col="w")660 row="x",·col="w")
661 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xe21e15b0>661 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xa15b4240>
662 [_build/html/_static/ds_facet_scatter_z.png]662 [_build/html/_static/ds_facet_scatter_z.png]
663 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data663 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data
664 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities664 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities
665 of·seaborn.665 of·seaborn.
666 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*666 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*
667 Visualizing·vector·fields·is·supported·with·quiver·plots:667 Visualizing·vector·fields·is·supported·with·quiver·plots:
668 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")668 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")
669 Out[109]:·<matplotlib.quiver.Quiver·at·0xecaa43c8>669 Out[109]:·<matplotlib.quiver.Quiver·at·0xa4179760>
670 [_build/html/_static/ds_simple_quiver.png]670 [_build/html/_static/ds_simple_quiver.png]
671 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.671 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.
672 Again,·faceting·is·also·possible:672 Again,·faceting·is·also·possible:
673 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)673 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)
674 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4dbd0d8>674 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xa40aca08>
675 [_build/html/_static/ds_facet_quiver.png]675 [_build/html/_static/ds_facet_quiver.png]
676 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of676 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of
677 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the677 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the
678 arrow·longer.678 arrow·longer.
679 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*679 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*
680 Visualizing·vector·fields·is·also·supported·with·streamline·plots:680 Visualizing·vector·fields·is·also·supported·with·streamline·plots:
681 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")681 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")
682 Out[111]:·<matplotlib.collections.LineCollection·at·0xe1c5e710>682 Out[111]:·<matplotlib.collections.LineCollection·at·0xa1afbd40>
683 [_build/html/_static/ds_simple_streamplot.png]683 [_build/html/_static/ds_simple_streamplot.png]
684 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to684 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to
685 the·streamlines.·Again,·faceting·is·also·possible:685 the·streamlines.·Again,·faceting·is·also·possible:
686 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")686 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")
687 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xe58426c0>687 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xa40e8180>
688 [_build/html/_static/ds_facet_streamplot.png]688 [_build/html/_static/ds_facet_streamplot.png]
689 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*689 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
690 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.690 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.
691 This·script·will·plot·the·air·temperature·on·a·map.691 This·script·will·plot·the·air·temperature·on·a·map.
692 In·[113]:·import·cartopy.crs·as·ccrs692 In·[113]:·import·cartopy.crs·as·ccrs
  
693 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air693 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air
694 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not694 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
695 create·data·cache·folder·'/nonexistent/first-build/.cache/695 create·data·cache·folder·'/nonexistent/second-build/.cache/
696 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.696 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
697 In·[115]:·p·=·air.isel(time=0).plot(697 In·[115]:·p·=·air.isel(time=0).plot(
698 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),698 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),
699 facecolor="gray"),699 facecolor="gray"),
700 ···.....:·····transform=ccrs.PlateCarree(),700 ···.....:·····transform=ccrs.PlateCarree(),
Offset 745, 24 lines modifiedOffset 745, 24 lines modified
745 In·[121]:·import·xarray.plot·as·xplt745 In·[121]:·import·xarray.plot·as·xplt
  
Max diff block lines reached; 6635/13804 bytes (48.07%) of diff not shown.
3.58 KB
./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html
    
Offset 554, 15 lines modifiedOffset 554, 15 lines modified
554 <section·id="reshaping-via-coarsen">554 <section·id="reshaping-via-coarsen">
555 <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2>555 <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2>
556 <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function556 <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function
557 (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>),557 (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>),
558 it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p>558 it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p>
559 <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p>559 <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p>
560 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)[</span><span·class="s2">&quot;air&quot;</span><span·class="p">]</span>560 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)[</span><span·class="s2">&quot;air&quot;</span><span·class="p">]</span>
561 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>561 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
562 <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;lon&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;lat&quot;</span><span·class="p">)</span>562 <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;lon&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;lat&quot;</span><span·class="p">)</span>
563 <span·class="go">NameError:·name·&#39;air&#39;·is·not·defined</span>563 <span·class="go">NameError:·name·&#39;air&#39;·is·not·defined</span>
564 </pre></div>564 </pre></div>
565 </div>565 </div>
566 <img·alt="_build/html/_static/pre_coarsening.png"·src="_build/html/_static/pre_coarsening.png"·/>566 <img·alt="_build/html/_static/pre_coarsening.png"·src="_build/html/_static/pre_coarsening.png"·/>
1.01 KB
html2text {}
    
Offset 440, 15 lines modifiedOffset 440, 15 lines modified
440 *\x8**\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sh\x8ha\x8ap\x8pi\x8in\x8ng\x8g·v\x8vi\x8ia\x8a·c\x8co\x8oa\x8ar\x8rs\x8se\x8en\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*440 *\x8**\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sh\x8ha\x8ap\x8pi\x8in\x8ng\x8g·v\x8vi\x8ia\x8a·c\x8co\x8oa\x8ar\x8rs\x8se\x8en\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
441 Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying441 Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying
442 a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to442 a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to
443 reorganise·your·data·without·applying·a·computation·via·construct().443 reorganise·your·data·without·applying·a·computation·via·construct().
444 Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US444 Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US
445 In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"]445 In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"]
446 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not446 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
447 create·data·cache·folder·'/nonexistent/first-build/.cache/447 create·data·cache·folder·'/nonexistent/second-build/.cache/
448 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.448 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
449 In·[57]:·air.isel(time=0).plot(x="lon",·y="lat")449 In·[57]:·air.isel(time=0).plot(x="lon",·y="lat")
450 NameError:·name·'air'·is·not·defined450 NameError:·name·'air'·is·not·defined
451 [_build/html/_static/pre_coarsening.png]451 [_build/html/_static/pre_coarsening.png]
452 we·can·split·this·up·into·sub-regions·of·size·(9,·18)·points·using·construct():452 we·can·split·this·up·into·sub-regions·of·size·(9,·18)·points·using·construct():
39.6 KB
./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
    
Offset 84, 29 lines modifiedOffset 84, 64 lines modified
84 <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3>84 <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3>
85 <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method,85 <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method,
86 which·is·a·general·hypothesis·method·valid·for·all·strategies.</p>86 which·is·a·general·hypothesis·method·valid·for·all·strategies.</p>
87 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span>87 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span>
  
88 <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>88 <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
89 <span·class="gh">Out[3]:·</span>89 <span·class="gh">Out[3]:·</span>
90 <span·class="go">&lt;xarray.Variable·(ā:·5)&gt;·Size:·40B</span>90 <span·class="go">&lt;xarray.Variable·(ĻĴkÚØ:·4,·ź:·5,·žFĶŏŇ:·3)&gt;·Size:·480B</span>
91 <span·class="go">array([27331,·35184,·····1,····39,····64],·dtype=uint64)</span>91 <span·class="go">array([[[···············47665,················47665,················23948],</span>
 92 <span·class="go">········[···············47665,················47665,················47665],</span>
 93 <span·class="go">········[···············47665,················47665,················47665],</span>
 94 <span·class="go">········[···············47665,················47665,················47665],</span>
 95 <span·class="go">········[···············47665,················47665,················47665]],</span>
  
 96 <span·class="go">·······[[·················106,················47665,················47665],</span>
 97 <span·class="go">········[···············47665,················47665,················47665],</span>
 98 <span·class="go">········[···············47665,················34006,················47665],</span>
 99 <span·class="go">········[···············47665,················47665,·18446744073709551614],</span>
 100 <span·class="go">········[···············23703,················47665,················47665]],</span>
  
 101 <span·class="go">·······[[···············47665,················47665,················47665],</span>
 102 <span·class="go">········[···············47665,················47665,················47665],</span>
 103 <span·class="go">········[···············47665,················47665,················47665],</span>
 104 <span·class="go">········[···············47665,················47665,···················21],</span>
 105 <span·class="go">········[···············47665,················47665,················47665]],</span>
  
 106 <span·class="go">·······[[···············47665,···········2523004207,················47665],</span>
 107 <span·class="go">········[···············47665,················47665,················47665],</span>
 108 <span·class="go">········[···············47665,····················1,················47665],</span>
 109 <span·class="go">········[···············47665,················47665,················47665],</span>
 110 <span·class="go">········[···············47665,················47665,················47665]]],</span>
 111 <span·class="go">······shape=(4,·5,·3),·dtype=uint64)</span>
92 <span·class="go">Attributes:</span>112 <span·class="go">Attributes:</span>
93 <span·class="go">····:·········{&#39;ŻıŌH¾&#39;:·&#39;&#39;,·&#39;ĥŽ&#39;:·array([&#39;~\U000b64e6®,ª嗡lt&#39;],·dtype=&#39;&gt;U9&#39;),·...</span> 
94 <span·class="go">····ÀþÈĦļ:····{&#39;ģěKLŬ&#39;:·array([[&#39;\x1c\x80ý\x1f;,Ïß&#39;],\n·······[&#39;$·\U00089171¾...</span>113 <span·class="go">····5bųŽ:·····[[&#39;&#39;]]</span>
 114 <span·class="go">····²ħWRň:····True</span>
 115 <span·class="go">····ėſŽ:······None</span>
 116 <span·class="go">····1²:·······[&#39;¬Ö&#39;·&#39;+&#39;]</span>
 117 <span·class="go">····ők:·······[[&#39;1911-08-17T22:47:30.027456707&#39;···························&#39;Na...</span>
  
95 <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>118 <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
96 <span·class="gh">Out[4]:·</span>119 <span·class="gh">Out[4]:·</span>
97 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·1B</span>120 <span·class="go">&lt;xarray.Variable·(P:·6)&gt;·Size:·48B</span>
98 <span·class="go">array([0],·dtype=int8)</span>121 <span·class="go">array([-1.837e+16,··1.401e-45,·-5.960e-08,·······-inf,··2.000e+00,·-2.220e-16])</span>
  
99 <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>122 <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
100 <span·class="gh">Out[5]:·</span>123 <span·class="gh">Out[5]:·</span>
101 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·1B</span>124 <span·class="go">&lt;xarray.Variable·(ģÞZ3:·1,·ÑŷąÄ:·1,·tżĢßĘ:·6)&gt;·Size:·48B</span>
102 <span·class="go">array([0],·dtype=int8)</span>125 <span·class="go">array([[[8377985931424500514,··················68,··················91,·················-29,</span>
 126 <span·class="go">·········1147078590519520977,··········-276458650]]],·dtype=int64)</span>
 127 <span·class="go">Attributes:</span>
 128 <span·class="go">····žŻœ2Ž:····[[29049]]</span>
 129 <span·class="go">····Ĕ:········ş</span>
 130 <span·class="go">····YqäŦř:····Py</span>
 131 <span·class="go">····:·········</span>
 132 <span·class="go">····ļ:········None</span>
 133 <span·class="go">····ũŻIJ:······False</span>
 134 <span·class="go">····fšWžò:····None</span>
103 </pre></div>135 </pre></div>
104 </div>136 </div>
105 <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide137 <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide
106 range·of·data·that·the·xarray·strategies·can·generate.</p>138 range·of·data·that·the·xarray·strategies·can·generate.</p>
107 <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the139 <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the
108 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>140 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>
109 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span>141 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span>
Offset 124, 93 lines modifiedOffset 159, 100 lines modified
124 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated159 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated
125 examples.</p>160 examples.</p>
126 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span>161 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span>
127 <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span>162 <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span>
  
128 <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>163 <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
129 <span·class="gh">Out[9]:·</span>164 <span·class="gh">Out[9]:·</span>
130 <span·class="go">&lt;xarray.Variable·(üAĚěâ:·6)&gt;·Size:·96B</span>165 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·8B</span>
 166 <span·class="go">array([0.+0.j],·dtype=&#39;&gt;c8&#39;)</span>
131 <span·class="go">array([-2.865e-73+10000000.j,·-2.865e-73+10000000.j,·-2.865e-73+10000000.j,·-2.865e-73+10000000.j,</span> 
132 <span·class="go">·······-2.865e-73+10000000.j,·-2.865e-73+10000000.j])</span> 
133 <span·class="go">Attributes:</span> 
134 <span·class="go">····Íĭ:·······False</span> 
135 </pre></div>167 </pre></div>
136 </div>168 </div>
137 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.169 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.
138 For·example·you·could·imagine·creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">chunks</span></code>·strategy·to·specify·particular·chunking·patterns·for·a·dask-backed·array.</p>170 For·example·you·could·imagine·creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">chunks</span></code>·strategy·to·specify·particular·chunking·patterns·for·a·dask-backed·array.</p>
139 </section>171 </section>
140 <section·id="fixing-arguments">172 <section·id="fixing-arguments">
141 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>173 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>
142 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples174 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples
143 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>175 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>
144 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="kn">import</span>·<span·class="nn">hypothesis.strategies</span>·<span·class="k">as</span>·<span·class="nn">st</span>176 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="kn">import</span>·<span·class="nn">hypothesis.strategies</span>·<span·class="k">as</span>·<span·class="nn">st</span>
  
145 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>177 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>
146 <span·class="gp">In·[11]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">([</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>178 <span·class="gp">In·[11]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">([</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
147 <span·class="gh">Out[11]:·</span>179 <span·class="gh">Out[11]:·</span>
148 <span·class="go">&lt;xarray.Variable·(x:·1,·y:·6)&gt;·Size:·12B</span>180 <span·class="go">&lt;xarray.Variable·(x:·3,·y:·1)&gt;·Size:·6B</span>
149 <span·class="go">array([[44663,·60390,·22926,·42571,·16528,·32487]],·dtype=uint16)</span>181 <span·class="go">array([[-0.·],</span>
 182 <span·class="go">·······[-0.·],</span>
 183 <span·class="go">·······[·1.1]],·dtype=float16)</span>
150 <span·class="go">Attributes:</span>184 <span·class="go">Attributes:</span>
 185 <span·class="go">····ż0ŬŅž:····None</span>
151 <span·class="go">····:·········None</span>186 <span·class="go">····ÃąGF:·····None</span>
 187 <span·class="go">····ĞùNÛų:····None</span>
152 </pre></div>188 </pre></div>
153 </div>189 </div>
154 <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a190 <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a
155 special·strategy·that·just·contains·a·single·example.)</p>191 special·strategy·that·just·contains·a·single·example.)</p>
156 <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths192 <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths
157 (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p>193 (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p>
158 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·[&quot;x&quot;,·&quot;y&quot;],·of·lengths·2·&amp;·3·respectively</span>194 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·[&quot;x&quot;,·&quot;y&quot;],·of·lengths·2·&amp;·3·respectively</span>
159 <span·class="gp">In·[12]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>195 <span·class="gp">In·[12]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
160 <span·class="gh">Out[12]:·</span>196 <span·class="gh">Out[12]:·</span>
161 <span·class="go">&lt;xarray.Variable·(x:·2,·y:·3)&gt;·Size:·48B</span>197 <span·class="go">&lt;xarray.Variable·(x:·2,·y:·3)&gt;·Size:·48B</span>
162 <span·class="go">array([[·1.798e+308,··1.782e+175,········-inf],</span> 
163 <span·class="go">·······[········nan,·-5.960e-008,··2.225e-308]])</span>198 <span·class="go">array([[-0.000e+00······-infj,··2.000e+00-6.104e-05j,··1.000e+07······-infj],</span>
 199 <span·class="go">·······[·1.175e-38+6.104e-05j,·-1.511e+15······+nanj,········nan+0.000e+00j]],·dtype=complex64)</span>
 200 <span·class="go">Attributes:</span>
 201 <span·class="go">····:·········{}</span>
 202 <span·class="go">····ÅyŻ:······{&#39;YéÀ&#39;:·&#39;ĀPēİž&#39;,·&#39;êėŲ&#39;:·True,·&#39;XĮź&#39;:·&#39;ű&#39;,·&#39;&#39;:·&#39;&#39;}</span>
 203 <span·class="go">····ÜŲşi:·····{&#39;&#39;:·True,·&#39;Ssōčž&#39;:·&#39;Ž&#39;,·&#39;ž&#39;:·None,·&#39;úÙ&#39;:·array([··4,·251],·dty...</span>
164 </pre></div>204 </pre></div>
165 </div>205 </div>
166 <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p>206 <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p>
167 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span>207 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span>
168 <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>208 <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
169 <span·class="gh">Out[13]:·</span>209 <span·class="gh">Out[13]:·</span>
170 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·1B</span>210 <span·class="go">&lt;xarray.Variable·(ĐĤʼnłÊ:·3,·Mžjßø:·3)&gt;·Size:·72B</span>
171 <span·class="go">array([0],·dtype=int8)</span>211 <span·class="go">array([[-1.······+infj,·inf······+nanj,··1.-0.000e+00j],</span>
 212 <span·class="go">·······[nan-0.000e+00j,·nan+2.220e-16j,·-0.+0.000e+00j],</span>
Max diff block lines reached; 14254/27584 bytes (51.67%) of diff not shown.
12.6 KB
html2text {}
    
Offset 28, 31 lines modifiedOffset 28, 66 lines modified
28 To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call28 To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call
29 one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method29 one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method
30 valid·for·all·strategies.30 valid·for·all·strategies.
31 In·[2]:·import·xarray.testing.strategies·as·xrst31 In·[2]:·import·xarray.testing.strategies·as·xrst
  
32 In·[3]:·xrst.variables().example()32 In·[3]:·xrst.variables().example()
33 Out[3]:33 Out[3]:
34 <xarray.Variable·(ā:·5)>·Size:·40B 
35 array([27331,·35184,·····1,····39,····64],·dtype=uint64)34 <xarray.Variable·(ĻĴkÚØ:·4,·ź:·5,·žFĶŏŇ:·3)>·Size:·480B
 35 array([[[···············47665,················47665,················23948],
 36 ········[···············47665,················47665,················47665],
 37 ········[···············47665,················47665,················47665],
 38 ········[···············47665,················47665,················47665],
 39 ········[···············47665,················47665,················47665]],
  
 40 ·······[[·················106,················47665,················47665],
 41 ········[···············47665,················47665,················47665],
 42 ········[···············47665,················34006,················47665],
 43 ········[···············47665,················47665,·18446744073709551614],
 44 ········[···············23703,················47665,················47665]],
  
 45 ·······[[···············47665,················47665,················47665],
 46 ········[···············47665,················47665,················47665],
 47 ········[···············47665,················47665,················47665],
 48 ········[···············47665,················47665,···················21],
 49 ········[···············47665,················47665,················47665]],
  
 50 ·······[[···············47665,···········2523004207,················47665],
 51 ········[···············47665,················47665,················47665],
 52 ········[···············47665,····················1,················47665],
 53 ········[···············47665,················47665,················47665],
 54 ········[···············47665,················47665,················47665]]],
 55 ······shape=(4,·5,·3),·dtype=uint64)
36 Attributes:56 Attributes:
37 ····:·········{'ŻıŌH¾':·'',·'ĥŽ':·array(['~\U000b64e6®,ª嗡lt'],·dtype='>U9'), 
38 ... 
39 ····ÀþÈĦļ:····{'ģěKLŬ':·array([['\x1c\x80ý\x1f;,Ïß'],\n·······['$ 
40 \U00089171¾...57 ····5bųŽ:·····[['']]
 58 ····²ħWRň:····True
 59 ····ėſŽ:······None
 60 ····1²:·······['¬Ö'·'+']
 61 ····ők:·······[['1911-08-17T22:47:30.027456707'
 62 'Na...
  
41 In·[4]:·xrst.variables().example()63 In·[4]:·xrst.variables().example()
42 Out[4]:64 Out[4]:
43 <xarray.Variable·(0:·1)>·Size:·1B65 <xarray.Variable·(P:·6)>·Size:·48B
44 array([0],·dtype=int8)66 array([-1.837e+16,··1.401e-45,·-5.960e-08,·······-inf,··2.000e+00,·-2.220e-16])
  
45 In·[5]:·xrst.variables().example()67 In·[5]:·xrst.variables().example()
46 Out[5]:68 Out[5]:
47 <xarray.Variable·(0:·1)>·Size:·1B 
48 array([0],·dtype=int8)69 <xarray.Variable·(ģÞZ3:·1,·ÑŷąÄ:·1,·tżĢßĘ:·6)>·Size:·48B
 70 array([[[8377985931424500514,··················68,··················91,
 71 -29,
 72 ·········1147078590519520977,··········-276458650]]],·dtype=int64)
 73 Attributes:
 74 ····žŻœ2Ž:····[[29049]]
 75 ····Ĕ:········ş
 76 ····YqäŦř:····Py
 77 ····:
 78 ····ļ:········None
 79 ····ũŻIJ:······False
 80 ····fšWžò:····None
49 You·can·see·that·calling·.example()·multiple·times·will·generate·different81 You·can·see·that·calling·.example()·multiple·times·will·generate·different
50 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray82 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray
51 strategies·can·generate.83 strategies·can·generate.
52 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should84 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should
53 parameterize·your·tests·with·the·hypothesis.given()·decorator:85 parameterize·your·tests·with·the·hypothesis.given()·decorator:
54 In·[6]:·from·hypothesis·import·given86 In·[6]:·from·hypothesis·import·given
55 In·[7]:·@given(xrst.variables())87 In·[7]:·@given(xrst.variables())
Offset 64, 92 lines modifiedOffset 99, 103 lines modified
64 customise·the·contents·of·the·generated·examples.99 customise·the·contents·of·the·generated·examples.
65 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all100 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all
66 other·details·still·arbitrary101 other·details·still·arbitrary
67 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes102 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes
  
68 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()103 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()
69 Out[9]:104 Out[9]:
70 <xarray.Variable·(üAĚěâ:·6)>·Size:·96B105 <xarray.Variable·(0:·1)>·Size:·8B
 106 array([0.+0.j],·dtype='>c8')
71 array([-2.865e-73+10000000.j,·-2.865e-73+10000000.j,·-2.865e-73+10000000.j,·- 
72 2.865e-73+10000000.j, 
73 ·······-2.865e-73+10000000.j,·-2.865e-73+10000000.j]) 
74 Attributes: 
75 ····Íĭ:·······False 
76 This·also·works·with·custom·strategies,·or·strategies·defined·in·other107 This·also·works·with·custom·strategies,·or·strategies·defined·in·other
77 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify108 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify
78 particular·chunking·patterns·for·a·dask-backed·array.109 particular·chunking·patterns·for·a·dask-backed·array.
79 *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*110 *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
80 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation111 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation
81 in·the·generated·examples·over·all·other·aspects,·then·use112 in·the·generated·examples·over·all·other·aspects,·then·use
82 hypothesis.strategies.just().113 hypothesis.strategies.just().
83 In·[10]:·import·hypothesis.strategies·as·st114 In·[10]:·import·hypothesis.strategies·as·st
  
84 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]115 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]
85 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()116 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()
86 Out[11]:117 Out[11]:
87 <xarray.Variable·(x:·1,·y:·6)>·Size:·12B118 <xarray.Variable·(x:·3,·y:·1)>·Size:·6B
88 array([[44663,·60390,·22926,·42571,·16528,·32487]],·dtype=uint16)119 array([[-0.·],
 120 ·······[-0.·],
 121 ·······[·1.1]],·dtype=float16)
89 Attributes:122 Attributes:
 123 ····ż0ŬŅž:····None
90 ····:·········None124 ····ÃąGF:·····None
 125 ····ĞùNÛų:····None
91 (This·is·technically·another·example·of·chaining·strategies·-126 (This·is·technically·another·example·of·chaining·strategies·-
92 hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a127 hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a
93 single·example.)128 single·example.)
94 To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of129 To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of
95 dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property),130 dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property),
96 e.g.131 e.g.
97 #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3132 #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3
98 respectively133 respectively
99 In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example()134 In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example()
100 Out[12]:135 Out[12]:
101 <xarray.Variable·(x:·2,·y:·3)>·Size:·48B136 <xarray.Variable·(x:·2,·y:·3)>·Size:·48B
102 array([[·1.798e+308,··1.782e+175,········-inf], 
103 ·······[········nan,·-5.960e-008,··2.225e-308]])137 array([[-0.000e+00······-infj,··2.000e+00-6.104e-05j,··1.000e+07······-infj],
 138 ·······[·1.175e-38+6.104e-05j,·-1.511e+15······+nanj,········nan+0.000e+00j]],
 139 dtype=complex64)
 140 Attributes:
 141 ····:·········{}
 142 ····ÅyŻ:······{'YéÀ':·'ĀPēİž',·'êėŲ':·True,·'XĮź':·'ű',·'':·''}
 143 ····ÜŲşi:·····{'':·True,·'Ssōčž':·'Ž',·'ž':·None,·'úÙ':·array([··4,·251],
 144 dty...
104 You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some145 You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some
Max diff block lines reached; 6740/12835 bytes (52.51%) of diff not shown.
3.69 KB
./usr/share/doc/python-xarray-doc/html/whats-new.html
    
Offset 7936, 15 lines modifiedOffset 7936, 15 lines modified
7936 <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according7936 <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according
7937 to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p>7937 to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p>
7938 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span>7938 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span>
  
7939 <span·class="gp">In·[45]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;distance&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span>7939 <span·class="gp">In·[45]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;distance&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span>
  
7940 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o">&lt;</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>7940 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o">&lt;</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xe0089450&gt;</span>7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xa410f870&gt;</span>
7942 </pre></div>7942 </pre></div>
7943 </div>7943 </div>
7944 <a·class="reference·internal·image-reference"·href="_build/html/_static/where_example.png"><img·alt="_build/html/_static/where_example.png"·src="_build/html/_static/where_example.png"·style="width:·4in;·height:·4in;"·/>7944 <a·class="reference·internal·image-reference"·href="_build/html/_static/where_example.png"><img·alt="_build/html/_static/where_example.png"·src="_build/html/_static/where_example.png"·style="width:·4in;·height:·4in;"·/>
7945 </a>7945 </a>
7946 </li>7946 </li>
7947 <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code>7947 <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code>
7948 for·finite·difference·calculations·along·a·given·axis.</p></li>7948 for·finite·difference·calculations·along·a·given·axis.</p></li>
968 B
html2text {}
    
Offset 5100, 15 lines modifiedOffset 5100, 15 lines modified
5100 ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some5100 ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some
5101 ······criteria.·This·works·particularly·well·with·multi-dimensional·data:5101 ······criteria.·This·works·particularly·well·with·multi-dimensional·data:
5102 ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)})5102 ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)})
  
5103 ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2)5103 ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2)
  
5104 ······In·[46]:·ds.distance.where(ds.distance·<·100).plot()5104 ······In·[46]:·ds.distance.where(ds.distance·<·100).plot()
5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xe0089450>5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xa410f870>
5106 ······_\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8]5106 ······_\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8]
5107 ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite5107 ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite
5108 ······difference·calculations·along·a·given·axis.5108 ······difference·calculations·along·a·given·axis.
5109 ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a5109 ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a
5110 ······numpy.ma.MaskedArray.5110 ······numpy.ma.MaskedArray.
5111 ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4)))5111 ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4)))