306 KB
/srv/reproducible-results/rbuild-debian/r-b-build.MuXG7bIj/b1/python-xarray_2025.01.2-1_armhf.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.MuXG7bIj/b2/python-xarray_2025.01.2-1_armhf.changes
309 B
Files
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
  
1 ·bee380e37bc442005bc9a299db2258b4·2007728·doc·optional·python-xarray-doc_2025.01.2-1_all.deb1 ·94e36dcdfd1c2683603b83ca7dee7cf8·2007860·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
305 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··2001364·2025-02-02·11:36:57.000000·data.tar.xz3 -rw-r--r--···0········0········0··2001500·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:·79836 Installed-Size:·7982
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
304 KB
data.tar.xz
304 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)·····1839·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)·····1831·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)····23737·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)····23732·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)·····8812·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)·····8787·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)····20990·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)·····3218·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)·····3206·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)·····3241·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)·····3229·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)·····2864·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)·····2854·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)·····3582·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)·····3567·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)···240555·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js212 -rw-r--r--···0·root·········(0)·root·········(0)···240861·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)···140217·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)···140217·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)····71342·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)····71342·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)···150024·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)···150024·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)····50874·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)····50874·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)···139974·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)···139977·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)···136094·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)···136096·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)····46801·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)····46801·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)····49532·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)····47321·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)····45688·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)····45688·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)····45199·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)····45199·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)··1017498·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)··1017498·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-12T04:48:21.706635Z', " "'iopub.status.busy': '2025-02-12T04:48:21.706122Z', 'iopub.status.idle': " "'2025-02-12T04:48:22.071039Z', 'shell.execute_reply': " "'2025-02-12T04:48:22.069584Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:22.179960Z', 'iopub.status.busy': " "'2025-02-12T04:48:22.179372Z', 'iopub.status.idle': '2025-02-12T04:48: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-12T04:29:49.979422Z",22 ····················"iopub.execute_input":·"2025-02-12T04:48:21.706635Z",
23 ····················"iopub.status.busy":·"2025-02-12T04:29:49.978666Z",23 ····················"iopub.status.busy":·"2025-02-12T04:48:21.706122Z",
24 ····················"iopub.status.idle":·"2025-02-12T04:29:51.013345Z",24 ····················"iopub.status.idle":·"2025-02-12T04:48:22.071039Z",
25 ····················"shell.execute_reply":·"2025-02-12T04:29:51.005321Z"25 ····················"shell.execute_reply":·"2025-02-12T04:48:22.069584Z"
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-12T04:29:51.232719Z",58 ····················"iopub.execute_input":·"2025-02-12T04:48:22.179960Z",
59 ····················"iopub.status.busy":·"2025-02-12T04:29:51.231942Z",59 ····················"iopub.status.busy":·"2025-02-12T04:48:22.179372Z",
60 ····················"iopub.status.idle":·"2025-02-12T04:29:51.323287Z",60 ····················"iopub.status.idle":·"2025-02-12T04:48:22.226304Z",
61 ····················"shell.execute_reply":·"2025-02-12T04:29:51.321342Z"61 ····················"shell.execute_reply":·"2025-02-12T04:48:22.224700Z"
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-12T04:29:51.331259Z",93 ····················"iopub.execute_input":·"2025-02-12T04:48:22.231034Z",
94 ····················"iopub.status.busy":·"2025-02-12T04:29:51.330577Z",94 ····················"iopub.status.busy":·"2025-02-12T04:48:22.230541Z",
95 ····················"iopub.status.idle":·"2025-02-12T04:29:51.415187Z",95 ····················"iopub.status.idle":·"2025-02-12T04:48:22.262562Z",
96 ····················"shell.execute_reply":·"2025-02-12T04:29:51.413337Z"96 ····················"shell.execute_reply":·"2025-02-12T04:48:22.260946Z"
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-12T04:29:51.423348Z",129 ····················"iopub.execute_input":·"2025-02-12T04:48:22.267371Z",
130 ····················"iopub.status.busy":·"2025-02-12T04:29:51.422646Z",130 ····················"iopub.status.busy":·"2025-02-12T04:48:22.266843Z",
131 ····················"iopub.status.idle":·"2025-02-12T04:29:52.331286Z",131 ····················"iopub.status.idle":·"2025-02-12T04:48:22.614471Z",
132 ····················"shell.execute_reply":·"2025-02-12T04:29:52.329325Z"132 ····················"shell.execute_reply":·"2025-02-12T04:48:22.613165Z"
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-12T04:29:52.343387Z",173 ····················"iopub.execute_input":·"2025-02-12T04:48:22.618981Z",
174 ····················"iopub.status.busy":·"2025-02-12T04:29:52.342660Z",174 ····················"iopub.status.busy":·"2025-02-12T04:48:22.618497Z",
175 ····················"iopub.status.idle":·"2025-02-12T04:29:52.404761Z",175 ····················"iopub.status.idle":·"2025-02-12T04:48:22.650694Z",
176 ····················"shell.execute_reply":·"2025-02-12T04:29:52.402836Z"176 ····················"shell.execute_reply":·"2025-02-12T04:48:22.649363Z"
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-12T04:48:25.964826Z', " "'iopub.status.busy': '2025-02-12T04:48:25.964340Z', 'iopub.status.idle': " "'2025-02-12T04:48:27.848311Z', 'shell.execute_reply': " "'2025-02-12T04:48:27.846968Z'}}}, 5: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:27.852924Z', 'iopub.status.busy': " "'2025-02-12T04:48:27.852406Z', 'iopub.status.idle': '2025-02-12T04:48:2 […]
    
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-12T04:30:03.159413Z",24 ····················"iopub.execute_input":·"2025-02-12T04:48:25.964826Z",
25 ····················"iopub.status.busy":·"2025-02-12T04:30:03.158651Z",25 ····················"iopub.status.busy":·"2025-02-12T04:48:25.964340Z",
26 ····················"iopub.status.idle":·"2025-02-12T04:30:10.201389Z",26 ····················"iopub.status.idle":·"2025-02-12T04:48:27.848311Z",
27 ····················"shell.execute_reply":·"2025-02-12T04:30:10.185343Z"27 ····················"shell.execute_reply":·"2025-02-12T04:48:27.846968Z"
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-12T04:30:10.215389Z",94 ····················"iopub.execute_input":·"2025-02-12T04:48:27.852924Z",
95 ····················"iopub.status.busy":·"2025-02-12T04:30:10.214615Z",95 ····················"iopub.status.busy":·"2025-02-12T04:48:27.852406Z",
96 ····················"iopub.status.idle":·"2025-02-12T04:30:10.299222Z",96 ····················"iopub.status.idle":·"2025-02-12T04:48:27.884603Z",
97 ····················"shell.execute_reply":·"2025-02-12T04:30:10.297343Z"97 ····················"shell.execute_reply":·"2025-02-12T04:48:27.883253Z"
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-12T04:30:10.307554Z",144 ····················"iopub.execute_input":·"2025-02-12T04:48:27.889326Z",
145 ····················"iopub.status.busy":·"2025-02-12T04:30:10.306753Z",145 ····················"iopub.status.busy":·"2025-02-12T04:48:27.888822Z",
146 ····················"iopub.status.idle":·"2025-02-12T04:30:10.415220Z",146 ····················"iopub.status.idle":·"2025-02-12T04:48:27.930460Z",
147 ····················"shell.execute_reply":·"2025-02-12T04:30:10.413330Z"147 ····················"shell.execute_reply":·"2025-02-12T04:48:27.929169Z"
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-12T04:30:10.431477Z",189 ····················"iopub.execute_input":·"2025-02-12T04:48:27.934751Z",
190 ····················"iopub.status.busy":·"2025-02-12T04:30:10.430729Z",190 ····················"iopub.status.busy":·"2025-02-12T04:48:27.934269Z",
191 ····················"iopub.status.idle":·"2025-02-12T04:30:10.535237Z",191 ····················"iopub.status.idle":·"2025-02-12T04:48:27.966686Z",
192 ····················"shell.execute_reply":·"2025-02-12T04:30:10.533323Z"192 ····················"shell.execute_reply":·"2025-02-12T04:48:27.965187Z"
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-12T04:30:10.543391Z",225 ····················"iopub.execute_input":·"2025-02-12T04:48:27.971332Z",
226 ····················"iopub.status.busy":·"2025-02-12T04:30:10.542659Z",226 ····················"iopub.status.busy":·"2025-02-12T04:48:27.970805Z",
227 ····················"iopub.status.idle":·"2025-02-12T04:30:10.679258Z",227 ····················"iopub.status.idle":·"2025-02-12T04:48:28.005446Z",
228 ····················"shell.execute_reply":·"2025-02-12T04:30:10.677336Z"228 ····················"shell.execute_reply":·"2025-02-12T04:48:28.004147Z"
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-12T04:30:10.687289Z",264 ····················"iopub.execute_input":·"2025-02-12T04:48:28.009979Z",
265 ····················"iopub.status.busy":·"2025-02-12T04:30:10.686594Z",265 ····················"iopub.status.busy":·"2025-02-12T04:48:28.009475Z",
266 ····················"iopub.status.idle":·"2025-02-12T04:30:10.791552Z",266 ····················"iopub.status.idle":·"2025-02-12T04:48:28.041895Z",
267 ····················"shell.execute_reply":·"2025-02-12T04:30:10.789353Z"267 ····················"shell.execute_reply":·"2025-02-12T04:48:28.040609Z"
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-12T04:30:10.799976Z",299 ····················"iopub.execute_input":·"2025-02-12T04:48:28.046352Z",
300 ····················"iopub.status.busy":·"2025-02-12T04:30:10.799271Z",300 ····················"iopub.status.busy":·"2025-02-12T04:48:28.045853Z",
301 ····················"iopub.status.idle":·"2025-02-12T04:30:11.499389Z",301 ····················"iopub.status.idle":·"2025-02-12T04:48:28.264255Z",
302 ····················"shell.execute_reply":·"2025-02-12T04:30:11.497344Z"302 ····················"shell.execute_reply":·"2025-02-12T04:48:28.262924Z"
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-12T04:48:31.764590Z', " "'iopub.status.busy': '2025-02-12T04:48:31.764063Z', 'iopub.status.idle': " "'2025-02-12T04:48:32.141117Z', 'shell.execute_reply': " "'2025-02-12T04:48:32.139740Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:32.145592Z', 'iopub.status.busy': " "'2025-02-12T04:48:32.145113Z', 'iopub.status.idle': '2025-02-12T04:48:3 […]
    
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-12T04:30:23.663642Z",43 ····················"iopub.execute_input":·"2025-02-12T04:48:31.764590Z",
44 ····················"iopub.status.busy":·"2025-02-12T04:30:23.662905Z",44 ····················"iopub.status.busy":·"2025-02-12T04:48:31.764063Z",
45 ····················"iopub.status.idle":·"2025-02-12T04:30:24.787204Z",45 ····················"iopub.status.idle":·"2025-02-12T04:48:32.141117Z",
46 ····················"shell.execute_reply":·"2025-02-12T04:30:24.785330Z"46 ····················"shell.execute_reply":·"2025-02-12T04:48:32.139740Z"
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-12T04:30:24.799440Z",92 ····················"iopub.execute_input":·"2025-02-12T04:48:32.145592Z",
93 ····················"iopub.status.busy":·"2025-02-12T04:30:24.798652Z",93 ····················"iopub.status.busy":·"2025-02-12T04:48:32.145113Z",
94 ····················"iopub.status.idle":·"2025-02-12T04:30:24.883440Z",94 ····················"iopub.status.idle":·"2025-02-12T04:48:32.176447Z",
95 ····················"shell.execute_reply":·"2025-02-12T04:30:24.881334Z"95 ····················"shell.execute_reply":·"2025-02-12T04:48:32.175099Z"
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-12T04:30:24.891481Z",132 ····················"iopub.execute_input":·"2025-02-12T04:48:32.180862Z",
133 ····················"iopub.status.busy":·"2025-02-12T04:30:24.890760Z",133 ····················"iopub.status.busy":·"2025-02-12T04:48:32.180341Z",
134 ····················"iopub.status.idle":·"2025-02-12T04:30:24.991188Z",134 ····················"iopub.status.idle":·"2025-02-12T04:48:32.216472Z",
135 ····················"shell.execute_reply":·"2025-02-12T04:30:24.989320Z"135 ····················"shell.execute_reply":·"2025-02-12T04:48:32.215147Z"
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-12T04:30:25.003206Z",191 ····················"iopub.execute_input":·"2025-02-12T04:48:32.221045Z",
192 ····················"iopub.status.busy":·"2025-02-12T04:30:25.002508Z",192 ····················"iopub.status.busy":·"2025-02-12T04:48:32.220561Z",
193 ····················"iopub.status.idle":·"2025-02-12T04:30:25.055182Z",193 ····················"iopub.status.idle":·"2025-02-12T04:48:32.252439Z",
194 ····················"shell.execute_reply":·"2025-02-12T04:30:25.053331Z"194 ····················"shell.execute_reply":·"2025-02-12T04:48:32.251028Z"
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-12T04:30:25.067364Z",257 ····················"iopub.execute_input":·"2025-02-12T04:48:32.257122Z",
258 ····················"iopub.status.busy":·"2025-02-12T04:30:25.066648Z",258 ····················"iopub.status.busy":·"2025-02-12T04:48:32.256628Z",
259 ····················"iopub.status.idle":·"2025-02-12T04:30:25.159255Z",259 ····················"iopub.status.idle":·"2025-02-12T04:48:32.289954Z",
260 ····················"shell.execute_reply":·"2025-02-12T04:30:25.157330Z"260 ····················"shell.execute_reply":·"2025-02-12T04:48:32.288630Z"
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-12T04:30:25.175563Z",335 ····················"iopub.execute_input":·"2025-02-12T04:48:32.294376Z",
336 ····················"iopub.status.busy":·"2025-02-12T04:30:25.174773Z",336 ····················"iopub.status.busy":·"2025-02-12T04:48:32.293834Z",
337 ····················"iopub.status.idle":·"2025-02-12T04:30:25.305367Z",337 ····················"iopub.status.idle":·"2025-02-12T04:48:32.328493Z",
338 ····················"shell.execute_reply":·"2025-02-12T04:30:25.289333Z"338 ····················"shell.execute_reply":·"2025-02-12T04:48:32.327079Z"
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-12T04:30:25.327327Z",381 ····················"iopub.execute_input":·"2025-02-12T04:48:32.333063Z",
382 ····················"iopub.status.busy":·"2025-02-12T04:30:25.326597Z",382 ····················"iopub.status.busy":·"2025-02-12T04:48:32.332562Z",
383 ····················"iopub.status.idle":·"2025-02-12T04:30:25.465394Z",383 ····················"iopub.status.idle":·"2025-02-12T04:48:32.367552Z",
384 ····················"shell.execute_reply":·"2025-02-12T04:30:25.449321Z"384 ····················"shell.execute_reply":·"2025-02-12T04:48:32.366276Z"
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-12T04:48:37.558377Z', " "'iopub.status.busy': '2025-02-12T04:48:37.557899Z', 'iopub.status.idle': " "'2025-02-12T04:48:38.997606Z', 'shell.execute_reply': " "'2025-02-12T04:48:38.996286Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:39.002303Z', 'iopub.status.busy': " "'2025-02-12T04:48:39.001820Z', 'iopub.status.idle': '2025-02-12T04:48:3 […]
    
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-12T04:30:40.479435Z",35 ····················"iopub.execute_input":·"2025-02-12T04:48:37.558377Z",
36 ····················"iopub.status.busy":·"2025-02-12T04:30:40.478662Z",36 ····················"iopub.status.busy":·"2025-02-12T04:48:37.557899Z",
37 ····················"iopub.status.idle":·"2025-02-12T04:30:43.063936Z",37 ····················"iopub.status.idle":·"2025-02-12T04:48:38.997606Z",
38 ····················"shell.execute_reply":·"2025-02-12T04:30:43.061227Z"38 ····················"shell.execute_reply":·"2025-02-12T04:48:38.996286Z"
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-12T04:30:43.072308Z",82 ····················"iopub.execute_input":·"2025-02-12T04:48:39.002303Z",
83 ····················"iopub.status.busy":·"2025-02-12T04:30:43.071563Z",83 ····················"iopub.status.busy":·"2025-02-12T04:48:39.001820Z",
84 ····················"iopub.status.idle":·"2025-02-12T04:30:43.125972Z",84 ····················"iopub.status.idle":·"2025-02-12T04:48:39.035505Z",
85 ····················"shell.execute_reply":·"2025-02-12T04:30:43.124141Z"85 ····················"shell.execute_reply":·"2025-02-12T04:48:39.034197Z"
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-12T04:30:43.133990Z",129 ····················"iopub.execute_input":·"2025-02-12T04:48:39.039964Z",
130 ····················"iopub.status.busy":·"2025-02-12T04:30:43.133282Z",130 ····················"iopub.status.busy":·"2025-02-12T04:48:39.039407Z",
131 ····················"iopub.status.idle":·"2025-02-12T04:30:43.524200Z",131 ····················"iopub.status.idle":·"2025-02-12T04:48:39.227864Z",
132 ····················"shell.execute_reply":·"2025-02-12T04:30:43.522342Z"132 ····················"shell.execute_reply":·"2025-02-12T04:48:39.226512Z"
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-12T04:30:43.532569Z",185 ····················"iopub.execute_input":·"2025-02-12T04:48:39.232402Z",
186 ····················"iopub.status.busy":·"2025-02-12T04:30:43.531840Z",186 ····················"iopub.status.busy":·"2025-02-12T04:48:39.231768Z",
187 ····················"iopub.status.idle":·"2025-02-12T04:30:43.630400Z",187 ····················"iopub.status.idle":·"2025-02-12T04:48:39.265790Z",
188 ····················"shell.execute_reply":·"2025-02-12T04:30:43.625349Z"188 ····················"shell.execute_reply":·"2025-02-12T04:48:39.264475Z"
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-12T04:30:43.643313Z",226 ····················"iopub.execute_input":·"2025-02-12T04:48:39.270161Z",
227 ····················"iopub.status.busy":·"2025-02-12T04:30:43.642576Z",227 ····················"iopub.status.busy":·"2025-02-12T04:48:39.269687Z",
228 ····················"iopub.status.idle":·"2025-02-12T04:30:43.727207Z",228 ····················"iopub.status.idle":·"2025-02-12T04:48:39.300522Z",
229 ····················"shell.execute_reply":·"2025-02-12T04:30:43.725325Z"229 ····················"shell.execute_reply":·"2025-02-12T04:48:39.299111Z"
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-12T04:30:43.735160Z",259 ····················"iopub.execute_input":·"2025-02-12T04:48:39.304712Z",
260 ····················"iopub.status.busy":·"2025-02-12T04:30:43.734467Z",260 ····················"iopub.status.busy":·"2025-02-12T04:48:39.304176Z",
261 ····················"iopub.status.idle":·"2025-02-12T04:30:43.815285Z",261 ····················"iopub.status.idle":·"2025-02-12T04:48:39.335619Z",
262 ····················"shell.execute_reply":·"2025-02-12T04:30:43.813367Z"262 ····················"shell.execute_reply":·"2025-02-12T04:48:39.334283Z"
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-12T04:30:43.823170Z",301 ····················"iopub.execute_input":·"2025-02-12T04:48:39.340418Z",
302 ····················"iopub.status.busy":·"2025-02-12T04:30:43.822473Z",302 ····················"iopub.status.busy":·"2025-02-12T04:48:39.339886Z",
303 ····················"iopub.status.idle":·"2025-02-12T04:30:43.975166Z",303 ····················"iopub.status.idle":·"2025-02-12T04:48:39.386454Z",
304 ····················"shell.execute_reply":·"2025-02-12T04:30:43.973333Z"304 ····················"shell.execute_reply":·"2025-02-12T04:48:39.385100Z"
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-12T04:48:42.826013Z', " "'iopub.status.busy': '2025-02-12T04:48:42.825536Z', 'iopub.status.idle': " "'2025-02-12T04:48:43.202767Z', 'shell.execute_reply': " "'2025-02-12T04:48:43.201392Z'}}}}"}
    
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-12T04:30:55.662721Z",19 ····················"iopub.execute_input":·"2025-02-12T04:48:42.826013Z",
20 ····················"iopub.status.busy":·"2025-02-12T04:30:55.661880Z",20 ····················"iopub.status.busy":·"2025-02-12T04:48:42.825536Z",
21 ····················"iopub.status.idle":·"2025-02-12T04:30:56.872128Z",21 ····················"iopub.status.idle":·"2025-02-12T04:48:43.202767Z",
22 ····················"shell.execute_reply":·"2025-02-12T04:30:56.869385Z"22 ····················"shell.execute_reply":·"2025-02-12T04:48:43.201392Z"
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-12T04:48:45.995830Z', " "'iopub.status.busy': '2025-02-12T04:48:45.995300Z', 'iopub.status.idle': " "'2025-02-12T04:48:47.878179Z', 'shell.execute_reply': " "'2025-02-12T04:48:47.876868Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:47.882673Z', 'iopub.status.busy': " "'2025-02-12T04:48:47.882193Z', 'iopub.status.idle': '2025-02-12T04:48:4 […]
    
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-12T04:31:05.867504Z",26 ····················"iopub.execute_input":·"2025-02-12T04:48:45.995830Z",
27 ····················"iopub.status.busy":·"2025-02-12T04:31:05.866716Z",27 ····················"iopub.status.busy":·"2025-02-12T04:48:45.995300Z",
28 ····················"iopub.status.idle":·"2025-02-12T04:31:11.263401Z",28 ····················"iopub.status.idle":·"2025-02-12T04:48:47.878179Z",
29 ····················"shell.execute_reply":·"2025-02-12T04:31:11.261356Z"29 ····················"shell.execute_reply":·"2025-02-12T04:48:47.876868Z"
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-12T04:31:11.271564Z",69 ····················"iopub.execute_input":·"2025-02-12T04:48:47.882673Z",
70 ····················"iopub.status.busy":·"2025-02-12T04:31:11.270813Z",70 ····················"iopub.status.busy":·"2025-02-12T04:48:47.882193Z",
71 ····················"iopub.status.idle":·"2025-02-12T04:31:11.359363Z",71 ····················"iopub.status.idle":·"2025-02-12T04:48:47.914323Z",
72 ····················"shell.execute_reply":·"2025-02-12T04:31:11.357350Z"72 ····················"shell.execute_reply":·"2025-02-12T04:48:47.913047Z"
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-12T04:31:11.379789Z",110 ····················"iopub.execute_input":·"2025-02-12T04:48:47.918510Z",
111 ····················"iopub.status.busy":·"2025-02-12T04:31:11.379028Z",111 ····················"iopub.status.busy":·"2025-02-12T04:48:47.918028Z",
112 ····················"iopub.status.idle":·"2025-02-12T04:31:11.463306Z",112 ····················"iopub.status.idle":·"2025-02-12T04:48:47.948648Z",
113 ····················"shell.execute_reply":·"2025-02-12T04:31:11.461355Z"113 ····················"shell.execute_reply":·"2025-02-12T04:48:47.947285Z"
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-12T04:31:11.471585Z",143 ····················"iopub.execute_input":·"2025-02-12T04:48:47.953066Z",
144 ····················"iopub.status.busy":·"2025-02-12T04:31:11.470848Z",144 ····················"iopub.status.busy":·"2025-02-12T04:48:47.952579Z",
145 ····················"iopub.status.idle":·"2025-02-12T04:31:11.567296Z",145 ····················"iopub.status.idle":·"2025-02-12T04:48:47.987496Z",
146 ····················"shell.execute_reply":·"2025-02-12T04:31:11.565333Z"146 ····················"shell.execute_reply":·"2025-02-12T04:48:47.986405Z"
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-12T04:31:11.575482Z",184 ····················"iopub.execute_input":·"2025-02-12T04:48:47.991501Z",
185 ····················"iopub.status.busy":·"2025-02-12T04:31:11.574769Z",185 ····················"iopub.status.busy":·"2025-02-12T04:48:47.991025Z",
186 ····················"iopub.status.idle":·"2025-02-12T04:31:11.659384Z",186 ····················"iopub.status.idle":·"2025-02-12T04:48:48.021389Z",
187 ····················"shell.execute_reply":·"2025-02-12T04:31:11.657363Z"187 ····················"shell.execute_reply":·"2025-02-12T04:48:48.020115Z"
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-12T04:31:11.667595Z",216 ····················"iopub.execute_input":·"2025-02-12T04:48:48.025801Z",
217 ····················"iopub.status.busy":·"2025-02-12T04:31:11.666853Z",217 ····················"iopub.status.busy":·"2025-02-12T04:48:48.025317Z",
218 ····················"iopub.status.idle":·"2025-02-12T04:31:11.755320Z",218 ····················"iopub.status.idle":·"2025-02-12T04:48:48.057618Z",
219 ····················"shell.execute_reply":·"2025-02-12T04:31:11.753347Z"219 ····················"shell.execute_reply":·"2025-02-12T04:48:48.056304Z"
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-12T04:31:11.763827Z",250 ····················"iopub.execute_input":·"2025-02-12T04:48:48.061881Z",
251 ····················"iopub.status.busy":·"2025-02-12T04:31:11.763043Z",251 ····················"iopub.status.busy":·"2025-02-12T04:48:48.061379Z",
252 ····················"iopub.status.idle":·"2025-02-12T04:31:11.915413Z",252 ····················"iopub.status.idle":·"2025-02-12T04:48:48.120485Z",
253 ····················"shell.execute_reply":·"2025-02-12T04:31:11.913344Z"253 ····················"shell.execute_reply":·"2025-02-12T04:48:48.119247Z"
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-12T04:48:54.210842Z', " "'iopub.status.busy': '2025-02-12T04:48:54.210364Z', 'iopub.status.idle': " "'2025-02-12T04:48:56.157373Z', 'shell.execute_reply': " "'2025-02-12T04:48:56.156095Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:48:56.162513Z', 'iopub.status.busy': " "'2025-02-12T04:48:56.161576Z', 'iopub.status.idle': '2025-02-12T04:48:5 […]
    
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-12T04:31:23.639704Z",23 ····················"iopub.execute_input":·"2025-02-12T04:48:54.210842Z",
24 ····················"iopub.status.busy":·"2025-02-12T04:31:23.638888Z",24 ····················"iopub.status.busy":·"2025-02-12T04:48:54.210364Z",
25 ····················"iopub.status.idle":·"2025-02-12T04:31:29.527818Z",25 ····················"iopub.status.idle":·"2025-02-12T04:48:56.157373Z",
26 ····················"shell.execute_reply":·"2025-02-12T04:31:29.525380Z"26 ····················"shell.execute_reply":·"2025-02-12T04:48:56.156095Z"
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-12T04:31:29.538489Z",67 ····················"iopub.execute_input":·"2025-02-12T04:48:56.162513Z",
68 ····················"iopub.status.busy":·"2025-02-12T04:31:29.537556Z",68 ····················"iopub.status.busy":·"2025-02-12T04:48:56.161576Z",
69 ····················"iopub.status.idle":·"2025-02-12T04:31:29.643783Z",69 ····················"iopub.status.idle":·"2025-02-12T04:48:56.203201Z",
70 ····················"shell.execute_reply":·"2025-02-12T04:31:29.641371Z"70 ····················"shell.execute_reply":·"2025-02-12T04:48:56.198142Z"
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-12T04:31:29.653878Z",107 ····················"iopub.execute_input":·"2025-02-12T04:48:56.216909Z",
108 ····················"iopub.status.busy":·"2025-02-12T04:31:29.652983Z",108 ····················"iopub.status.busy":·"2025-02-12T04:48:56.214738Z",
109 ····················"iopub.status.idle":·"2025-02-12T04:31:29.751621Z",109 ····················"iopub.status.idle":·"2025-02-12T04:48:56.261429Z",
110 ····················"shell.execute_reply":·"2025-02-12T04:31:29.749363Z"110 ····················"shell.execute_reply":·"2025-02-12T04:48:56.259491Z"
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-12T04:31:29.761303Z",149 ····················"iopub.execute_input":·"2025-02-12T04:48:56.266728Z",
150 ····················"iopub.status.busy":·"2025-02-12T04:31:29.760383Z",150 ····················"iopub.status.busy":·"2025-02-12T04:48:56.265928Z",
151 ····················"iopub.status.idle":·"2025-02-12T04:31:29.863583Z",151 ····················"iopub.status.idle":·"2025-02-12T04:48:56.314702Z",
152 ····················"shell.execute_reply":·"2025-02-12T04:31:29.861349Z"152 ····················"shell.execute_reply":·"2025-02-12T04:48:56.312811Z"
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-12T04:31:29.873114Z",192 ····················"iopub.execute_input":·"2025-02-12T04:48:56.320297Z",
193 ····················"iopub.status.busy":·"2025-02-12T04:31:29.872353Z",193 ····················"iopub.status.busy":·"2025-02-12T04:48:56.319398Z",
194 ····················"iopub.status.idle":·"2025-02-12T04:31:29.971622Z",194 ····················"iopub.status.idle":·"2025-02-12T04:48:56.365496Z",
195 ····················"shell.execute_reply":·"2025-02-12T04:31:29.969362Z"195 ····················"shell.execute_reply":·"2025-02-12T04:48:56.363382Z"
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-12T04:31:29.981345Z",231 ····················"iopub.execute_input":·"2025-02-12T04:48:56.371504Z",
232 ····················"iopub.status.busy":·"2025-02-12T04:31:29.980509Z",232 ····················"iopub.status.busy":·"2025-02-12T04:48:56.370186Z",
233 ····················"iopub.status.idle":·"2025-02-12T04:31:30.091606Z",233 ····················"iopub.status.idle":·"2025-02-12T04:48:56.424176Z",
234 ····················"shell.execute_reply":·"2025-02-12T04:31:30.089358Z"234 ····················"shell.execute_reply":·"2025-02-12T04:48:56.422425Z"
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-12T04:31:30.101170Z",279 ····················"iopub.execute_input":·"2025-02-12T04:48:56.430353Z",
280 ····················"iopub.status.busy":·"2025-02-12T04:31:30.100383Z",280 ····················"iopub.status.busy":·"2025-02-12T04:48:56.429197Z",
281 ····················"iopub.status.idle":·"2025-02-12T04:31:30.207506Z",281 ····················"iopub.status.idle":·"2025-02-12T04:48:56.480037Z",
282 ····················"shell.execute_reply":·"2025-02-12T04:31:30.205337Z"282 ····················"shell.execute_reply":·"2025-02-12T04:48:56.478317Z"
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-12T04:49:02.926679Z', " "'iopub.status.busy': '2025-02-12T04:49:02.926164Z', 'iopub.status.idle': " "'2025-02-12T04:49:04.430297Z', 'shell.execute_reply': " "'2025-02-12T04:49:04.429070Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:49:04.435573Z', 'iopub.status.busy': " "'2025-02-12T04:49:04.434710Z', 'iopub.status.idle': '2025-02-12T04:49:0 […]
    
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-12T04:31:41.555435Z",17 ····················"iopub.execute_input":·"2025-02-12T04:49:02.926679Z",
18 ····················"iopub.status.busy":·"2025-02-12T04:31:41.554686Z",18 ····················"iopub.status.busy":·"2025-02-12T04:49:02.926164Z",
19 ····················"iopub.status.idle":·"2025-02-12T04:31:46.003725Z",19 ····················"iopub.status.idle":·"2025-02-12T04:49:04.430297Z",
20 ····················"shell.execute_reply":·"2025-02-12T04:31:46.001357Z"20 ····················"shell.execute_reply":·"2025-02-12T04:49:04.429070Z"
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-12T04:31:46.013461Z",56 ····················"iopub.execute_input":·"2025-02-12T04:49:04.435573Z",
57 ····················"iopub.status.busy":·"2025-02-12T04:31:46.012586Z",57 ····················"iopub.status.busy":·"2025-02-12T04:49:04.434710Z",
58 ····················"iopub.status.idle":·"2025-02-12T04:31:46.107574Z",58 ····················"iopub.status.idle":·"2025-02-12T04:49:04.469497Z",
59 ····················"shell.execute_reply":·"2025-02-12T04:31:46.105353Z"59 ····················"shell.execute_reply":·"2025-02-12T04:49:04.467942Z"
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-12T04:31:46.115746Z",98 ····················"iopub.execute_input":·"2025-02-12T04:49:04.475424Z",
99 ····················"iopub.status.busy":·"2025-02-12T04:31:46.114914Z",99 ····················"iopub.status.busy":·"2025-02-12T04:49:04.474454Z",
100 ····················"iopub.status.idle":·"2025-02-12T04:31:46.239669Z",100 ····················"iopub.status.idle":·"2025-02-12T04:49:04.517205Z",
101 ····················"shell.execute_reply":·"2025-02-12T04:31:46.237349Z"101 ····················"shell.execute_reply":·"2025-02-12T04:49:04.515873Z"
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-12T04:31:46.249362Z",151 ····················"iopub.execute_input":·"2025-02-12T04:49:04.522413Z",
152 ····················"iopub.status.busy":·"2025-02-12T04:31:46.248520Z",152 ····················"iopub.status.busy":·"2025-02-12T04:49:04.521922Z",
153 ····················"iopub.status.idle":·"2025-02-12T04:31:46.395596Z",153 ····················"iopub.status.idle":·"2025-02-12T04:49:04.571529Z",
154 ····················"shell.execute_reply":·"2025-02-12T04:31:46.393344Z"154 ····················"shell.execute_reply":·"2025-02-12T04:49:04.569998Z"
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-12T04:31:46.404678Z",215 ····················"iopub.execute_input":·"2025-02-12T04:49:04.577668Z",
216 ····················"iopub.status.busy":·"2025-02-12T04:31:46.403841Z",216 ····················"iopub.status.busy":·"2025-02-12T04:49:04.577174Z",
217 ····················"iopub.status.idle":·"2025-02-12T04:31:46.550767Z",217 ····················"iopub.status.idle":·"2025-02-12T04:49:04.619025Z",
218 ····················"shell.execute_reply":·"2025-02-12T04:31:46.541088Z"218 ····················"shell.execute_reply":·"2025-02-12T04:49:04.617376Z"
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-12T04:31:46.567686Z",271 ····················"iopub.execute_input":·"2025-02-12T04:49:04.624653Z",
272 ····················"iopub.status.busy":·"2025-02-12T04:31:46.566824Z",272 ····················"iopub.status.busy":·"2025-02-12T04:49:04.624099Z",
273 ····················"iopub.status.idle":·"2025-02-12T04:31:46.691584Z",273 ····················"iopub.status.idle":·"2025-02-12T04:49:04.668108Z",
274 ····················"shell.execute_reply":·"2025-02-12T04:31:46.689355Z"274 ····················"shell.execute_reply":·"2025-02-12T04:49:04.666051Z"
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-12T04:49:08.378749Z', " "'iopub.status.busy': '2025-02-12T04:49:08.377321Z', 'iopub.status.idle': " "'2025-02-12T04:49:11.275809Z', 'shell.execute_reply': " "'2025-02-12T04:49:11.274474Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-02-12T04:49:11.280287Z', 'iopub.status.busy': " "'2025-02-12T04:49:11.279755Z', 'iopub.status.idle': '2025-02-12T04:49:1 […]
    
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-12T04:31:56.491525Z",22 ····················"iopub.execute_input":·"2025-02-12T04:49:08.378749Z",
23 ····················"iopub.status.busy":·"2025-02-12T04:31:56.490739Z",23 ····················"iopub.status.busy":·"2025-02-12T04:49:08.377321Z",
24 ····················"iopub.status.idle":·"2025-02-12T04:32:04.101424Z",24 ····················"iopub.status.idle":·"2025-02-12T04:49:11.275809Z",
25 ····················"shell.execute_reply":·"2025-02-12T04:32:04.085385Z"25 ····················"shell.execute_reply":·"2025-02-12T04:49:11.274474Z"
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-12T04:32:04.115700Z",93 ····················"iopub.execute_input":·"2025-02-12T04:49:11.280287Z",
94 ····················"iopub.status.busy":·"2025-02-12T04:32:04.114830Z",94 ····················"iopub.status.busy":·"2025-02-12T04:49:11.279755Z",
95 ····················"iopub.status.idle":·"2025-02-12T04:32:04.253423Z",95 ····················"iopub.status.idle":·"2025-02-12T04:49:11.312748Z",
96 ····················"shell.execute_reply":·"2025-02-12T04:32:04.237370Z"96 ····················"shell.execute_reply":·"2025-02-12T04:49:11.311314Z"
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-12T04:32:04.267803Z",126 ····················"iopub.execute_input":·"2025-02-12T04:49:11.318188Z",
127 ····················"iopub.status.busy":·"2025-02-12T04:32:04.266925Z",127 ····················"iopub.status.busy":·"2025-02-12T04:49:11.316658Z",
128 ····················"iopub.status.idle":·"2025-02-12T04:32:04.405402Z",128 ····················"iopub.status.idle":·"2025-02-12T04:49:11.350249Z",
129 ····················"shell.execute_reply":·"2025-02-12T04:32:04.389362Z"129 ····················"shell.execute_reply":·"2025-02-12T04:49:11.348921Z"
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-12T04:32:04.419714Z",165 ····················"iopub.execute_input":·"2025-02-12T04:49:11.355946Z",
166 ····················"iopub.status.busy":·"2025-02-12T04:32:04.418832Z",166 ····················"iopub.status.busy":·"2025-02-12T04:49:11.354981Z",
167 ····················"iopub.status.idle":·"2025-02-12T04:32:04.565401Z",167 ····················"iopub.status.idle":·"2025-02-12T04:49:11.390455Z",
168 ····················"shell.execute_reply":·"2025-02-12T04:32:04.549364Z"168 ····················"shell.execute_reply":·"2025-02-12T04:49:11.389132Z"
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-12T04:32:04.579704Z",204 ····················"iopub.execute_input":·"2025-02-12T04:49:11.396867Z",
205 ····················"iopub.status.busy":·"2025-02-12T04:32:04.578835Z",205 ····················"iopub.status.busy":·"2025-02-12T04:49:11.395455Z",
206 ····················"iopub.status.idle":·"2025-02-12T04:32:04.683713Z",206 ····················"iopub.status.idle":·"2025-02-12T04:49:11.429820Z",
207 ····················"shell.execute_reply":·"2025-02-12T04:32:04.681336Z"207 ····················"shell.execute_reply":·"2025-02-12T04:49:11.428469Z"
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-12T04:32:04.699716Z",243 ····················"iopub.execute_input":·"2025-02-12T04:49:11.435942Z",
244 ····················"iopub.status.busy":·"2025-02-12T04:32:04.698831Z",244 ····················"iopub.status.busy":·"2025-02-12T04:49:11.434800Z",
245 ····················"iopub.status.idle":·"2025-02-12T04:32:04.811642Z",245 ····················"iopub.status.idle":·"2025-02-12T04:49:11.470860Z",
246 ····················"shell.execute_reply":·"2025-02-12T04:32:04.809373Z"246 ····················"shell.execute_reply":·"2025-02-12T04:49:11.469612Z"
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-12T04:32:04.823634Z",276 ····················"iopub.execute_input":·"2025-02-12T04:49:11.477500Z",
277 ····················"iopub.status.busy":·"2025-02-12T04:32:04.822760Z",277 ····················"iopub.status.busy":·"2025-02-12T04:49:11.475964Z",
278 ····················"iopub.status.idle":·"2025-02-12T04:32:04.887551Z",278 ····················"iopub.status.idle":·"2025-02-12T04:49:11.509712Z",
279 ····················"shell.execute_reply":·"2025-02-12T04:32:04.885343Z"279 ····················"shell.execute_reply":·"2025-02-12T04:49:11.508351Z"
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·0xebd3cd20&gt;</span>331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xaa41bc68&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·0xebd3cd20>260 Out[37]:·<matplotlib.collections.QuadMesh·at·0xaa41bc68>
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·0xe5dcaf10&gt;</span>171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa4e81730&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;.zattrs&#39;,·&#39;longitude&#39;,·&#39;.zmetadata&#39;,·&#39;latitude&#39;,·&#39;.zgroup&#39;]</span>174 <span·class="go">[&#39;longitude&#39;,·&#39;latitude&#39;,·&#39;.zgroup&#39;,·&#39;.zattrs&#39;,·&#39;.zmetadata&#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·0xe5dcaf10>120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xa4e81730>
  
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 ['.zattrs',·'longitude',·'.zmetadata',·'latitude',·'.zgroup']123 ['longitude',·'latitude',·'.zgroup',·'.zattrs',·'.zmetadata']
  
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)
43.7 KB
./usr/share/doc/python-xarray-doc/html/searchindex.js
43.6 KB
js-beautify {}
    
Offset 2353, 54 lines modifiedOffset 2353, 49 lines modified
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,·51,·52,·53,·54],2359 ········"00":·[36,·37,·38,·45,·47,·51,·52,·53,·54],
2360 ········"000":·51, 
2361 ········"000000":·16,2360 ········"000000":·16,
2362 ········"000000000":·[37,·38,·52],2361 ········"000000000":·[37,·38,·52],
2363 ········"0001":·[53,·54],2362 ········"0001":·[53,·54],
2364 ········"00010101":·53,2363 ········"00010101":·53,
2365 ········"00010201":·53,2364 ········"00010201":·53,
2366 ········"00010301":·53,2365 ········"00010301":·53,
2367 ········"0002":·53,2366 ········"0002":·53,
2368 ········"00021001":·53,2367 ········"00021001":·53,
2369 ········"00021101":·53,2368 ········"00021101":·53,
2370 ········"00021201":·53,2369 ········"00021201":·53,
2371 ········"000e":·[48,·51],2370 ········"000e":·[48,·51],
2372 ········"000j":·51, 
2373 ········"001e":·37,2371 ········"001e":·[37,·51],
2374 ········"001j":·51, 
2375 ········"005036":·40,2372 ········"005036":·40,
2376 ········"005e":·37,2373 ········"005e":·37,
2377 ········"005j":·51, 
2378 ········"00688889":·36,2374 ········"00688889":·36,
2379 ········"006e":·[37,·51],2375 ········"006e":·37,
2380 ········"007j":·51,2376 ········"007":·51,
2381 ········"00914929":·36,2377 ········"00914929":·36,
2382 ········"00941742":·36,2378 ········"00941742":·36,
2383 ········"00968205":·36,2379 ········"00968205":·36,
2384 ········"00973567":·36,2380 ········"00973567":·36,
2385 ········"00e":·51, 
2386 ········"00j":·51,2381 ········"00j":·51,
2387 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·51,·52,·53],2382 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·51,·52,·53],
2388 ········"01082401":·36,2383 ········"01082401":·36,
2389 ········"01183847":·36,2384 ········"01183847":·36,
2390 ········"016":·51, 
2391 ········"01636376":·36,2385 ········"01636376":·36,
2392 ········"01652688":·36,2386 ········"01652688":·36,
2393 ········"01652764":·36,2387 ········"01652764":·36,
2394 ········"0165891":·36,2388 ········"0165891":·36,
2395 ········"01670071":·36,2389 ········"01670071":·36,
2396 ········"01670121":·36,2390 ········"01670121":·36,
2397 ········"01671269":·36,2391 ········"01671269":·36,
2398 ········"01671847":·36,2392 ········"01671847":·36,
2399 ········"01672":·36,2393 ········"01672":·36,
 2394 ········"016j":·51,
2400 ········"017":·43,2395 ········"017":·43,
2401 ········"01806694":·36,2396 ········"01806694":·36,
2402 ········"01814439":·36,2397 ········"01814439":·36,
2403 ········"0182217":·36,2398 ········"0182217":·36,
2404 ········"018e":·37,2399 ········"018e":·37,
2405 ········"019":·40,2400 ········"019":·40,
2406 ········"01906":·48,2401 ········"01906":·48,
Offset 2442, 14 lines modifiedOffset 2437, 15 lines modified
2442 ········"04097352":·36,2437 ········"04097352":·36,
2443 ········"040e":·48,2438 ········"040e":·48,
2444 ········"0417827":·45,2439 ········"0417827":·45,
2445 ········"042e":·37,2440 ········"042e":·37,
2446 ········"044":·[35,·47],2441 ········"044":·[35,·47],
2447 ········"04423597":·19,2442 ········"04423597":·19,
2448 ········"044236":·47,2443 ········"044236":·47,
 2444 ········"045":·51,
2449 ········"04569531":·36,2445 ········"04569531":·36,
2450 ········"045j":·51,2446 ········"045j":·51,
2451 ········"04703446":·36,2447 ········"04703446":·36,
2452 ········"047e":·[37,·48],2448 ········"047e":·[37,·48],
2453 ········"04835611":·36,2449 ········"04835611":·36,
2454 ········"04862391":·36,2450 ········"04862391":·36,
2455 ········"048e":·37,2451 ········"048e":·37,
Offset 2457, 32 lines modifiedOffset 2453, 31 lines modified
2457 ········"05":·[36,·38,·45,·48,·51,·52,·53],2453 ········"05":·[36,·38,·45,·48,·51,·52,·53],
2458 ········"05405954":·36,2454 ········"05405954":·36,
2459 ········"05556":·44,2455 ········"05556":·44,
2460 ········"056":·44,2456 ········"056":·44,
2461 ········"057e":·37,2457 ········"057e":·37,
2462 ········"058e":·37,2458 ········"058e":·37,
2463 ········"05912615":·36,2459 ········"05912615":·36,
2464 ········"05j":·51, 
2465 ········"05t00":·37,2460 ········"05t00":·37,
2466 ········"06":·[28,·36,·38,·45,·52],2461 ········"06":·[28,·36,·38,·45,·52],
2467 ········"061":·43,2462 ········"061":·43,
2468 ········"06141":·41,2463 ········"06141":·41,
2469 ········"062":·41,2464 ········"062":·41,
2470 ········"063":·38,2465 ········"063":·38,
2471 ········"06683875":·36,2466 ········"06683875":·36,
2472 ········"06683951":·36,2467 ········"06683951":·36,
2473 ········"06683976":·36,2468 ········"06683976":·36,
2474 ········"06689":·36,2469 ········"06689":·36,
2475 ········"066e":·[37,·48],2470 ········"066e":·[37,·48],
2476 ········"06732":·41,2471 ········"06732":·41,
2477 ········"067e":·[48,·51],2472 ········"067e":·48,
2478 ········"069":·44,2473 ········"069":·44,
2479 ········"06957":·40,2474 ········"06957":·40,
2480 ········"06t00":·37,2475 ········"06t00":·37,
2481 ········"07":·[38,·52,·53],2476 ········"07":·[38,·51,·52,·53],
2482 ········"070e":·37,2477 ········"070e":·37,
2483 ········"07180381":·19,2478 ········"07180381":·19,
2484 ········"071804":·47,2479 ········"071804":·47,
2485 ········"072":·47,2480 ········"072":·47,
2486 ········"072e":·48,2481 ········"072e":·48,
2487 ········"074e":·37,2482 ········"074e":·37,
2488 ········"078":·41,2483 ········"078":·41,
Offset 2504, 14 lines modifiedOffset 2499, 15 lines modified
2504 ········"08444113":·36,2499 ········"08444113":·36,
2505 ········"084e":·48,2500 ········"084e":·48,
2506 ········"0868139":·36,2501 ········"0868139":·36,
2507 ········"08724442":·36,2502 ········"08724442":·36,
2508 ········"08729468":·36,2503 ········"08729468":·36,
2509 ········"088":·38,2504 ········"088":·38,
2510 ········"089e":·37,2505 ········"089e":·37,
 2506 ········"08j":·51,
2511 ········"08t00":·37,2507 ········"08t00":·37,
2512 ········"09":·[36,·38,·52],2508 ········"09":·[36,·38,·52],
2513 ········"09179":·36,2509 ········"09179":·36,
2514 ········"091e":·37,2510 ········"091e":·37,
2515 ········"094":·[41,·43],2511 ········"094":·[41,·43],
2516 ········"094e":·48,2512 ········"094e":·48,
2517 ········"096":·43,2513 ········"096":·43,
Offset 2521, 109 lines modifiedOffset 2517, 107 lines modified
2521 ········"099":·41,2517 ········"099":·41,
2522 ········"09t00":·37,2518 ········"09t00":·37,
2523 ········"0alpha10":·54,2519 ········"0alpha10":·54,
2524 ········"0d":·54,2520 ········"0d":·54,
2525 ········"0dev":·54,2521 ········"0dev":·54,
2526 ········"0th":·[37,·43],2522 ········"0th":·[37,·43],
Max diff block lines reached; 41052/44569 bytes (92.11%) of diff not shown.
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·0xe5e1fc90&gt;]</span>738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa59492f0&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·0xe5e1fd40&gt;]</span>740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa59499d0&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·0xe5e1fc90>]592 Out[64]:·[<matplotlib.lines.Line2D·at·0xa59492f0>]
  
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·0xe5e1fd40>]595 Out[65]:·[<matplotlib.lines.Line2D·at·0xa59499d0>]
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·0xebd3eb30&gt;]</span>243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xaa418190&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·0xebd3e0e0&gt;]</span>245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xaa4180e0&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·0xebd3e030&gt;]</span>247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xaa418030&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·0xebcb2480&gt;</span>249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0xaa3933c8&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·0xebd3eb30>]160 Out[17]:·[<matplotlib.lines.Line2D·at·0xaa418190>]
  
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·0xebd3e0e0>]163 Out[18]:·[<matplotlib.lines.Line2D·at·0xaa4180e0>]
  
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·0xebd3e030>]166 Out[19]:·[<matplotlib.lines.Line2D·at·0xaa418030>]
  
167 In·[20]:·plt.legend()167 In·[20]:·plt.legend()
168 Out[20]:·<matplotlib.legend.Legend·at·0xebcb2480>168 Out[20]:·<matplotlib.legend.Legend·at·0xaa3933c8>
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·0xe482e898&gt;</span>636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa38df8e0&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-96dc18f3-7206-4a17-82fd-925907127ca7&#39;)</span>728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-8103d755-1ddf-40f3-a912-18fefd2f112f&#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·0xe4ae0340&gt;</span>742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b8f388&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·0xe4adc388&gt;</span>744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b8a580&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·0xe4adcf10&gt;</span>746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b8af10&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·0xe4af01d8&gt;</span>773 <span·class="gh">Out[28]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b9f220&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·0xe4af0730&gt;</span>822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b9f778&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·0xe4af0a90&gt;</span>833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3b9fad8&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·0xe4b09220&gt;</span>889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa3bb7268&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·0xe482e898>487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xa38df8e0>
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-96dc18f3-7206-4a17-82fd-925907127ca7')566 Out[20]:·Delayed('_finalize_store-8103d755-1ddf-40f3-a912-18fefd2f112f')
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·0xe4ae0340>579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xa3b8f388>
  
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·0xe4adc388>581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xa3b8a580>
  
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·0xe4adcf10>583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xa3b8af10>
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·0xe4af01d8>605 Out[28]:·<xarray.backends.zarr.ZarrStore·at·0xa3b9f220>
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·0xe4af0730>641 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xa3b9f778>
  
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·0xe4af0a90>652 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xa3b9fad8>
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·0xe4b09220>703 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xa3bb7268>
  
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·0xe2e3f190&gt;]</span>449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa207a190&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·0xe4fa5258&gt;</span>863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa4051258&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·0xe3123df0&gt;</span>869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa21cadf0&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·0xe313f2f0&gt;</span>875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa21ed2f0&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·0xe2dea7c0&gt;</span>881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1e9c7c0&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·0xe2c88500&gt;</span>887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1d383a0&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·0xe2c399d0&gt;</span>892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa1ced9d0&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·0xe2fd0660&gt;</span>899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa2080660&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·0xe2c88030&gt;</span>905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa1d38190&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·0xe4292030&gt;</span>911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa3303030&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·0xe25b6190&gt;</span>917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa1666190&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·0xe49f85f0&gt;</span>928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0xaa49add8&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·0xe4fbd030&gt;</span>934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa40fc768&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·0xe2a5c0e0&gt;</span>945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0xa1b0a0e0&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·0xe2e3f190>]296 Out[51]:·[<matplotlib.lines.Line2D·at·0xa207a190>]
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 612, 92 lines modifiedOffset 612, 92 lines modified
612 ··*·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.0612 ··*·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
613 ··*·z········(z)·int32·16B·0·1·2·3613 ··*·z········(z)·int32·16B·0·1·2·3
614 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'614 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'
615 Attributes:615 Attributes:
616 ····units:····Aunits616 ····units:····Aunits
  
617 In·[99]:·ds.A.plot.scatter(x="y")617 In·[99]:·ds.A.plot.scatter(x="y")
618 Out[99]:·<matplotlib.collections.PathCollection·at·0xe4fa5258>618 Out[99]:·<matplotlib.collections.PathCollection·at·0xa4051258>
619 [_build/html/_static/da_A_y.png]619 [_build/html/_static/da_A_y.png]
620 Same·plot·can·be·displayed·using·the·dataset:620 Same·plot·can·be·displayed·using·the·dataset:
621 In·[100]:·ds.plot.scatter(x="y",·y="A")621 In·[100]:·ds.plot.scatter(x="y",·y="A")
622 Out[100]:·<matplotlib.collections.PathCollection·at·0xe3123df0>622 Out[100]:·<matplotlib.collections.PathCollection·at·0xa21cadf0>
623 [_build/html/_static/ds_A_y.png]623 [_build/html/_static/ds_A_y.png]
624 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray624 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray
625 In·[101]:·ds.plot.scatter(x="A",·y="B")625 In·[101]:·ds.plot.scatter(x="A",·y="B")
626 Out[101]:·<matplotlib.collections.PathCollection·at·0xe313f2f0>626 Out[101]:·<matplotlib.collections.PathCollection·at·0xa21ed2f0>
627 [_build/html/_static/ds_simple_scatter.png]627 [_build/html/_static/ds_simple_scatter.png]
628 The·hue·kwarg·lets·you·vary·the·color·by·variable·value628 The·hue·kwarg·lets·you·vary·the·color·by·variable·value
629 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")629 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")
630 Out[102]:·<matplotlib.collections.PathCollection·at·0xe2dea7c0>630 Out[102]:·<matplotlib.collections.PathCollection·at·0xa1e9c7c0>
631 [_build/html/_static/ds_hue_scatter.png]631 [_build/html/_static/ds_hue_scatter.png]
632 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,632 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,
633 add_colorbar=False.633 add_colorbar=False.
634 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,634 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,
635 add_colorbar=False)635 add_colorbar=False)
636 Out[103]:·<matplotlib.collections.PathCollection·at·0xe2c88500>636 Out[103]:·<matplotlib.collections.PathCollection·at·0xa1d383a0>
637 [_build/html/_static/ds_discrete_legend_hue_scatter.png]637 [_build/html/_static/ds_discrete_legend_hue_scatter.png]
638 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,638 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,
639 add_colorbar=True)639 add_colorbar=True)
640 Out[104]:·<matplotlib.collections.PathCollection·at·0xe2c399d0>640 Out[104]:·<matplotlib.collections.PathCollection·at·0xa1ced9d0>
641 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]641 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]
642 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can642 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can
643 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to643 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to
644 point·sizes.644 point·sizes.
645 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")645 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")
646 Out[105]:·<matplotlib.collections.PathCollection·at·0xe2fd0660>646 Out[105]:·<matplotlib.collections.PathCollection·at·0xa2080660>
647 [_build/html/_static/ds_hue_size_scatter.png]647 [_build/html/_static/ds_hue_size_scatter.png]
648 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.648 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.
649 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")649 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")
650 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe2c88030>650 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa1d38190>
651 [_build/html/_static/ds_hue_size_scatter_z.png]651 [_build/html/_static/ds_hue_size_scatter_z.png]
652 Faceting·is·also·possible652 Faceting·is·also·possible
653 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",653 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",
654 col="w")654 col="w")
655 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4292030>655 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xa3303030>
656 [_build/html/_static/ds_facet_scatter.png]656 [_build/html/_static/ds_facet_scatter.png]
657 And·adding·the·z-axis657 And·adding·the·z-axis
658 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",658 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",
659 row="x",·col="w")659 row="x",·col="w")
660 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xe25b6190>660 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xa1666190>
661 [_build/html/_static/ds_facet_scatter_z.png]661 [_build/html/_static/ds_facet_scatter_z.png]
662 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data662 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data
663 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities663 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities
664 of·seaborn.664 of·seaborn.
665 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*665 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*
666 Visualizing·vector·fields·is·supported·with·quiver·plots:666 Visualizing·vector·fields·is·supported·with·quiver·plots:
667 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")667 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")
668 Out[109]:·<matplotlib.quiver.Quiver·at·0xe49f85f0>668 Out[109]:·<matplotlib.quiver.Quiver·at·0xaa49add8>
669 [_build/html/_static/ds_simple_quiver.png]669 [_build/html/_static/ds_simple_quiver.png]
670 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.670 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.
671 Again,·faceting·is·also·possible:671 Again,·faceting·is·also·possible:
672 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)672 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)
673 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4fbd030>673 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xa40fc768>
674 [_build/html/_static/ds_facet_quiver.png]674 [_build/html/_static/ds_facet_quiver.png]
675 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of675 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of
676 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the676 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the
677 arrow·longer.677 arrow·longer.
678 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*678 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*
679 Visualizing·vector·fields·is·also·supported·with·streamline·plots:679 Visualizing·vector·fields·is·also·supported·with·streamline·plots:
680 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")680 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")
681 Out[111]:·<matplotlib.collections.LineCollection·at·0xe2a5c0e0>681 Out[111]:·<matplotlib.collections.LineCollection·at·0xa1b0a0e0>
682 [_build/html/_static/ds_simple_streamplot.png]682 [_build/html/_static/ds_simple_streamplot.png]
683 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to683 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to
684 the·streamlines.·Again,·faceting·is·also·possible:684 the·streamlines.·Again,·faceting·is·also·possible:
685 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")685 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")
686 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xe504b8b8>686 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xa39246c0>
687 [_build/html/_static/ds_facet_streamplot.png]687 [_build/html/_static/ds_facet_streamplot.png]
688 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*688 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
689 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.689 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.
690 This·script·will·plot·the·air·temperature·on·a·map.690 This·script·will·plot·the·air·temperature·on·a·map.
691 In·[113]:·import·cartopy.crs·as·ccrs691 In·[113]:·import·cartopy.crs·as·ccrs
  
692 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air692 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air
693 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not693 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
694 create·data·cache·folder·'/nonexistent/first-build/.cache/694 create·data·cache·folder·'/nonexistent/second-build/.cache/
695 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.695 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
696 In·[115]:·p·=·air.isel(time=0).plot(696 In·[115]:·p·=·air.isel(time=0).plot(
697 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),697 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),
698 facecolor="gray"),698 facecolor="gray"),
699 ···.....:·····transform=ccrs.PlateCarree(),699 ···.....:·····transform=ccrs.PlateCarree(),
Offset 744, 24 lines modifiedOffset 744, 24 lines modified
744 In·[121]:·import·xarray.plot·as·xplt744 In·[121]:·import·xarray.plot·as·xplt
  
Max diff block lines reached; 6621/13790 bytes (48.01%) 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():
34.3 KB
./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
    
Offset 84, 60 lines modifiedOffset 84, 44 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·(Ž7:·6,·äFFñŘ:·4,·q:·3)&gt;·Size:·576B</span>90 <span·class="go">&lt;xarray.Variable·(8Ô7:·2,·şÂ:·4)&gt;·Size:·128B</span>
 91 <span·class="go">array([[········inf·······+nanj,·-1.192e-007-2.225e-309j,·········inf-1.401e-045j,</span>
 92 <span·class="go">················inf·······-infj],</span>
 93 <span·class="go">·······[·1.000e+007·······-infj,·-1.401e-045-1.175e-038j,·-1.798e+308-2.220e-016j,</span>
 94 <span·class="go">················inf·······+nanj]])</span>
91 <span·class="go">array([[[-1.100e+00+0.000e+00j,··3.333e-01-3.403e+38j,·-1.100e+00+0.000e+00j],</span> 
92 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
93 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
94 <span·class="go">········[-1.100e+00+0.000e+00j,·-0.000e+00+2.958e+16j,·-1.100e+00+0.000e+00j]],</span> 
  
95 <span·class="go">·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
96 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
97 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
98 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,········nan······+infj]],</span> 
  
99 <span·class="go">·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
100 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
101 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
102 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]],</span> 
  
103 <span·class="go">·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
104 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
105 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
106 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]],</span> 
  
107 <span·class="go">·······[[·0.000e+00······+infj,·-1.100e+00+0.000e+00j,··1.100e+00-3.168e+16j],</span> 
108 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
109 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
110 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]],</span> 
  
111 <span·class="go">·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
112 <span·class="go">········[-1.100e+00+0.000e+00j,·······-inf+6.104e-05j,·-1.100e+00+0.000e+00j],</span> 
113 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j],</span> 
114 <span·class="go">········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,··5.701e+16-3.128e+16j]]],·dtype=complex64)</span> 
  
115 <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>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>
116 <span·class="gh">Out[4]:·</span>96 <span·class="gh">Out[4]:·</span>
117 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·2B</span>97 <span·class="go">&lt;xarray.Variable·(İĴĝ:·1)&gt;·Size:·2B</span>
118 <span·class="go">array([0.],·dtype=float16)</span>98 <span·class="go">array([-17713],·dtype=int16)</span>
 99 <span·class="go">Attributes:</span>
 100 <span·class="go">····ĿŪĉŻů:····True</span>
  
119 <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>101 <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>
120 <span·class="gh">Out[5]:·</span>102 <span·class="gh">Out[5]:·</span>
121 <span·class="go">&lt;xarray.Variable·(Ţ:·3,·x:·1,·ĶØ:·2)&gt;·Size:·6B</span>103 <span·class="go">&lt;xarray.Variable·(:·5)&gt;·Size:·10B</span>
 104 <span·class="go">array([·······inf,·-3.333e-01,··0.000e+00,··1.001e-05,·-0.000e+00],·dtype=float16)</span>
122 <span·class="go">array([[[225,·225]],</span> 
  
123 <span·class="go">·······[[225,·225]],</span> 
  
124 <span·class="go">·······[[225,·225]]],·dtype=uint8)</span> 
125 <span·class="go">Attributes:</span>105 <span·class="go">Attributes:</span>
126 <span·class="go">····:·········{&#39;ŅQ&#39;:·{&#39;D&#39;:·array([&#39;NaT&#39;],·dtype=&#39;&gt;m8[h]&#39;),·&#39;ÖĵŽ5º&#39;:·True,·&#39;&#39;:...</span>106 <span·class="go">····Ň:········Ğ</span>
 107 <span·class="go">····:·········False</span>
 108 <span·class="go">····õŻſ¾Ż:····None</span>
 109 <span·class="go">····Żþ:·······None</span>
 110 <span·class="go">····Ř:········ĒěÔŸO</span>
 111 <span·class="go">····h:········False</span>
 112 <span·class="go">····ŽţÑzµ:····³</span>
 113 <span·class="go">····yŻđ½ı:····None</span>
 114 <span·class="go">····Ŋá:·······None</span>
 115 <span·class="go">····ſkğŝij:····False</span>
 116 <span·class="go">····ŽŧKūï:····None</span>
 117 <span·class="go">····ž:········True</span>
127 </pre></div>118 </pre></div>
128 </div>119 </div>
129 <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·wide120 <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
130 range·of·data·that·the·xarray·strategies·can·generate.</p>121 range·of·data·that·the·xarray·strategies·can·generate.</p>
131 <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·the122 <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
132 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>123 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>
133 <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>124 <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 155, 100 lines modifiedOffset 139, 98 lines modified
155 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated139 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated
156 examples.</p>140 examples.</p>
157 <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>141 <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>
158 <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>142 <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>
  
159 <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>143 <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>
160 <span·class="gh">Out[9]:·</span>144 <span·class="gh">Out[9]:·</span>
161 <span·class="go">&lt;xarray.Variable·(u:·1,·ąĕŬķ:·4,·5ĒÄŵĆ:·3)&gt;·Size:·192B</span>145 <span·class="go">&lt;xarray.Variable·(Sż:·2,·:·1,·ţŻdŻ:·4)&gt;·Size:·64B</span>
162 <span·class="go">array([[[-5.592e+016-1.900e+000j,·-1.006e+120+1.175e-038j,··1.000e+000-6.104e-005j],</span> 
163 <span·class="go">········[·1.067e-146-1.175e-038j,··2.220e-016-2.225e-308j,·········inf-5.000e-001j],</span> 
164 <span·class="go">········[········nan+1.000e-005j,·-4.941e-324·······+infj,·········inf+2.545e-005j],</span> 
165 <span·class="go">········[·1.000e+000-1.175e-038j,·········nan+1.401e-045j,·········inf-1.192e-007j]]],·dtype=&#39;&gt;c16&#39;)</span>146 <span·class="go">array([[[······-inf-1.100e+00j,·-1.000e+00+1.192e-07j,········nan······+nanj,</span>
 147 <span·class="go">················nan-1.175e-38j]],</span>
  
 148 <span·class="go">·······[[-2.127e+15+2.220e-16j,·······-inf+2.220e-16j,··1.293e+16+1.175e-38j,</span>
 149 <span·class="go">··········1.500e+00-1.000e+07j]]],·dtype=complex64)</span>
166 <span·class="go">Attributes:</span>150 <span·class="go">Attributes:</span>
 151 <span·class="go">····KŽŜĞő:····[[b&#39;-\t\x0b]&#39;·b&#39;/\xc4&gt;&#39;]\n·[b&#39;7~&#39;·b&#39;&#39;]]</span>
167 <span·class="go">····ijÎŔŘņ:····{}</span>152 <span·class="go">····:·········None</span>
 153 <span·class="go">····ű:········True</span>
 154 <span·class="go">····Ž½:·······[&#39;\U000cd584\U00089e26&#39;·&#39;&#39;]</span>
168 </pre></div>155 </pre></div>
169 </div>156 </div>
170 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.157 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.
171 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>158 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>
172 </section>159 </section>
173 <section·id="fixing-arguments">160 <section·id="fixing-arguments">
174 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>161 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>
175 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples162 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples
176 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>163 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>
177 <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>164 <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>
  
178 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>165 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>
179 <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>166 <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>
180 <span·class="gh">Out[11]:·</span>167 <span·class="gh">Out[11]:·</span>
181 <span·class="go">&lt;xarray.Variable·(x:·5,·y:·6)&gt;·Size:·30B</span>168 <span·class="go">&lt;xarray.Variable·(x:·1,·y:·1)&gt;·Size:·1B</span>
 169 <span·class="go">array([[0]],·dtype=int8)</span>
182 <span·class="go">array([[··47,···47,···47,···81,··-36,···47],</span> 
183 <span·class="go">·······[··47,···47,··-40,···47,···47,···47],</span> 
184 <span·class="go">·······[··21,···47,·-128,···47,···47,···47],</span> 
185 <span·class="go">·······[··47,···47,··-83,···47,···47,···47],</span> 
186 <span·class="go">·······[···5,···47,···57,···47,···47,···47]],·dtype=int8)</span> 
187 <span·class="go">Attributes:</span> 
188 <span·class="go">····Żżżā:·····{&#39;Ë6żÛž&#39;:·False,·&#39;ſĕċZw&#39;:·array([[b&#39;&#39;],\n·······[b&#39;n\xac\xe8\xe...</span> 
189 <span·class="go">····êóŴŽ:·····{}</span> 
190 </pre></div>170 </pre></div>
191 </div>171 </div>
192 <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·a172 <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
Max diff block lines reached; 12200/23878 bytes (51.09%) of diff not shown.
10.8 KB
html2text {}
    
Offset 28, 62 lines modifiedOffset 28, 47 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·(Ž7:·6,·äFFñŘ:·4,·q:·3)>·Size:·576B34 <xarray.Variable·(8Ô7:·2,·şÂ:·4)>·Size:·128B
 35 array([[········inf·······+nanj,·-1.192e-007-2.225e-309j,·········inf-1.401e-
 36 045j,
 37 ················inf·······-infj],
 38 ·······[·1.000e+007·······-infj,·-1.401e-045-1.175e-038j,·-1.798e+308-2.220e-
 39 016j,
 40 ················inf·······+nanj]])
35 array([[[-1.100e+00+0.000e+00j,··3.333e-01-3.403e+38j,·-1.100e+00+0.000e+00j], 
36 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
37 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
38 ········[-1.100e+00+0.000e+00j,·-0.000e+00+2.958e+16j,·-1.100e+00+0.000e+00j]], 
  
39 ·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
40 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
41 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
42 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,········nan······+infj]], 
  
43 ·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
44 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
45 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
46 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]], 
  
47 ·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
48 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
49 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
50 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]], 
  
51 ·······[[·0.000e+00······+infj,·-1.100e+00+0.000e+00j,··1.100e+00-3.168e+16j], 
52 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
53 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
54 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j]], 
  
55 ·······[[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
56 ········[-1.100e+00+0.000e+00j,·······-inf+6.104e-05j,·-1.100e+00+0.000e+00j], 
57 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j], 
58 ········[-1.100e+00+0.000e+00j,·-1.100e+00+0.000e+00j,··5.701e+16- 
59 3.128e+16j]]],·dtype=complex64) 
  
60 In·[4]:·xrst.variables().example()41 In·[4]:·xrst.variables().example()
61 Out[4]:42 Out[4]:
62 <xarray.Variable·(0:·1)>·Size:·2B43 <xarray.Variable·(İĴĝ:·1)>·Size:·2B
63 array([0.],·dtype=float16)44 array([-17713],·dtype=int16)
 45 Attributes:
 46 ····ĿŪĉŻů:····True
  
64 In·[5]:·xrst.variables().example()47 In·[5]:·xrst.variables().example()
65 Out[5]:48 Out[5]:
 49 <xarray.Variable·(8Ž:·5)>·Size:·10B
 50 array([·······inf,·-3.333e-01,··0.000e+00,··1.001e-05,·-0.000e+00],
 51 dtype=float16)
66 <xarray.Variable·(Ţ:·3,·x:·1,·ĶØ:·2)>·Size:·6B 
67 array([[[225,·225]], 
  
68 ·······[[225,·225]], 
  
69 ·······[[225,·225]]],·dtype=uint8) 
70 Attributes:52 Attributes:
71 ····:·········{'ŅQ':·{'D':·array(['NaT'],·dtype='>m8[h]'),·'ÖĵŽ5º':·True, 
72 '':...53 ····Ň:········Ğ
 54 ····:·········False
 55 ····õŻſ¾Ż:····None
 56 ····Żþ:·······None
 57 ····Ř:········ĒěÔŸO
 58 ····h:········False
 59 ····ŽţÑzµ:····³
 60 ····yŻđ½ı:····None
 61 ····Ŋá:·······None
 62 ····ſkğŝij:····False
 63 ····ŽŧKūï:····None
 64 ····ž:········True
73 You·can·see·that·calling·.example()·multiple·times·will·generate·different65 You·can·see·that·calling·.example()·multiple·times·will·generate·different
74 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray66 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray
75 strategies·can·generate.67 strategies·can·generate.
76 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should68 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should
77 parameterize·your·tests·with·the·hypothesis.given()·decorator:69 parameterize·your·tests·with·the·hypothesis.given()·decorator:
78 In·[6]:·from·hypothesis·import·given70 In·[6]:·from·hypothesis·import·given
79 In·[7]:·@given(xrst.variables())71 In·[7]:·@given(xrst.variables())
Offset 95, 106 lines modifiedOffset 80, 98 lines modified
95 customise·the·contents·of·the·generated·examples.80 customise·the·contents·of·the·generated·examples.
96 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all81 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all
97 other·details·still·arbitrary82 other·details·still·arbitrary
98 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes83 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes
  
99 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()84 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()
100 Out[9]:85 Out[9]:
 86 <xarray.Variable·(Sż:·2,·mŕ:·1,·ţŻdŻ:·4)>·Size:·64B
 87 array([[[······-inf-1.100e+00j,·-1.000e+00+1.192e-07j,········nan······+nanj,
 88 ················nan-1.175e-38j]],
  
 89 ·······[[-2.127e+15+2.220e-16j,·······-inf+2.220e-16j,··1.293e+16+1.175e-38j,
 90 ··········1.500e+00-1.000e+07j]]],·dtype=complex64)
101 <xarray.Variable·(u:·1,·ąĕŬķ:·4,·5ĒÄŵĆ:·3)>·Size:·192B 
102 array([[[-5.592e+016-1.900e+000j,·-1.006e+120+1.175e-038j,··1.000e+000-6.104e- 
103 005j], 
104 ········[·1.067e-146-1.175e-038j,··2.220e-016-2.225e-308j,·········inf-5.000e- 
105 001j], 
106 ········[········nan+1.000e-005j,·-4.941e-324·······+infj,·········inf+2.545e- 
107 005j], 
108 ········[·1.000e+000-1.175e-038j,·········nan+1.401e-045j,·········inf-1.192e- 
109 007j]]],·dtype='>c16') 
110 Attributes:91 Attributes:
111 ····ijÎŔŘņ:····{}92 ····KŽŜĞő:····[[b'-\t\x0b]'·b'/\xc4>']\n·[b'7~'·b'']]
 93 ····:·········None
 94 ····ű:········True
 95 ····Ž½:·······['\U000cd584\U00089e26'·'']
112 This·also·works·with·custom·strategies,·or·strategies·defined·in·other96 This·also·works·with·custom·strategies,·or·strategies·defined·in·other
113 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify97 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify
114 particular·chunking·patterns·for·a·dask-backed·array.98 particular·chunking·patterns·for·a·dask-backed·array.
115 *\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*99 *\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*
116 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation100 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation
117 in·the·generated·examples·over·all·other·aspects,·then·use101 in·the·generated·examples·over·all·other·aspects,·then·use
118 hypothesis.strategies.just().102 hypothesis.strategies.just().
119 In·[10]:·import·hypothesis.strategies·as·st103 In·[10]:·import·hypothesis.strategies·as·st
  
120 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]104 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]
121 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()105 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()
122 Out[11]:106 Out[11]:
123 <xarray.Variable·(x:·5,·y:·6)>·Size:·30B107 <xarray.Variable·(x:·1,·y:·1)>·Size:·1B
 108 array([[0]],·dtype=int8)
124 array([[··47,···47,···47,···81,··-36,···47], 
Max diff block lines reached; 4850/11057 bytes (43.86%) 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·0xe4f27920&gt;</span>7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xa4c20f50&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·0xe4f27920>5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xa4c20f50>
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)))