Skip to content

Commit

Permalink
deploy: 1181d9d
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Sep 28, 2023
1 parent bbb18b0 commit 3b9e326
Show file tree
Hide file tree
Showing 44 changed files with 348 additions and 337 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e695eca4dcfd0f2a9e178abe3c0a43d7
config: b5696c4cde9ce06df25475698113fa3d
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified _images/sphx_glr_plotting_010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 18 additions & 22 deletions _modules/xarray/core/common.html

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions _modules/xarray/core/concat.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h1>Source code for xarray.core.concat</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">from</span> <span class="nn">collections.abc</span> <span class="kn">import</span> <span class="n">Hashable</span><span class="p">,</span> <span class="n">Iterable</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span><span class="p">,</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">cast</span><span class="p">,</span> <span class="n">overload</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span><span class="p">,</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">overload</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
Expand Down Expand Up @@ -785,17 +785,20 @@ <h1>Source code for xarray.core.concat</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;unexpected value for </span><span class="si">{</span><span class="n">subset</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">opt</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">invalid_vars</span> <span class="o">=</span> <span class="p">[</span><span class="n">k</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">opt</span> <span class="k">if</span> <span class="n">k</span> <span class="ow">not</span> <span class="ow">in</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">datasets</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">subset</span><span class="p">)]</span>
<span class="n">valid_vars</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">datasets</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">subset</span><span class="p">))</span>
<span class="n">invalid_vars</span> <span class="o">=</span> <span class="p">[</span><span class="n">k</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">opt</span> <span class="k">if</span> <span class="n">k</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">valid_vars</span><span class="p">]</span>
<span class="k">if</span> <span class="n">invalid_vars</span><span class="p">:</span>
<span class="k">if</span> <span class="n">subset</span> <span class="o">==</span> <span class="s2">&quot;coords&quot;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;some variables in coords are not coordinates on &quot;</span>
<span class="sa">f</span><span class="s2">&quot;the first dataset: </span><span class="si">{</span><span class="n">invalid_vars</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="sa">f</span><span class="s2">&quot;the variables </span><span class="si">{</span><span class="n">invalid_vars</span><span class="si">}</span><span class="s2"> in coords are not &quot;</span>
<span class="sa">f</span><span class="s2">&quot;found in the coordinates of the first dataset </span><span class="si">{</span><span class="n">valid_vars</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># note: data_vars are not listed in the error message here,</span>
<span class="c1"># because there may be lots of them</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;some variables in data_vars are not data variables &quot;</span>
<span class="sa">f</span><span class="s2">&quot;on the first dataset: </span><span class="si">{</span><span class="n">invalid_vars</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="sa">f</span><span class="s2">&quot;the variables </span><span class="si">{</span><span class="n">invalid_vars</span><span class="si">}</span><span class="s2"> in data_vars are not &quot;</span>
<span class="sa">f</span><span class="s2">&quot;found in the data variables of the first dataset&quot;</span>
<span class="p">)</span>
<span class="n">concat_over</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">opt</span><span class="p">)</span>

Expand Down Expand Up @@ -895,8 +898,7 @@ <h1>Source code for xarray.core.concat</h1><div class="highlight"><pre>

<span class="c1"># case where concat dimension is a coordinate or data_var but not a dimension</span>
<span class="k">if</span> <span class="p">(</span><span class="n">dim</span> <span class="ow">in</span> <span class="n">coord_names</span> <span class="ow">or</span> <span class="n">dim</span> <span class="ow">in</span> <span class="n">data_names</span><span class="p">)</span> <span class="ow">and</span> <span class="n">dim</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">dim_names</span><span class="p">:</span>
<span class="c1"># TODO: Overriding type because .expand_dims has incorrect typing:</span>
<span class="n">datasets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cast</span><span class="p">(</span><span class="n">T_Dataset</span><span class="p">,</span> <span class="n">ds</span><span class="o">.</span><span class="n">expand_dims</span><span class="p">(</span><span class="n">dim</span><span class="p">))</span> <span class="k">for</span> <span class="n">ds</span> <span class="ow">in</span> <span class="n">datasets</span><span class="p">]</span>
<span class="n">datasets</span> <span class="o">=</span> <span class="p">[</span><span class="n">ds</span><span class="o">.</span><span class="n">expand_dims</span><span class="p">(</span><span class="n">dim</span><span class="p">)</span> <span class="k">for</span> <span class="n">ds</span> <span class="ow">in</span> <span class="n">datasets</span><span class="p">]</span>

<span class="c1"># determine which variables to concatenate</span>
<span class="n">concat_over</span><span class="p">,</span> <span class="n">equals</span><span class="p">,</span> <span class="n">concat_dim_lengths</span> <span class="o">=</span> <span class="n">_calc_concat_over</span><span class="p">(</span>
Expand Down Expand Up @@ -1099,8 +1101,7 @@ <h1>Source code for xarray.core.concat</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">compat</span> <span class="o">==</span> <span class="s2">&quot;identical&quot;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;array names not identical&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># TODO: Overriding type because .rename has incorrect typing:</span>
<span class="n">arr</span> <span class="o">=</span> <span class="n">cast</span><span class="p">(</span><span class="n">T_DataArray</span><span class="p">,</span> <span class="n">arr</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">name</span><span class="p">))</span>
<span class="n">arr</span> <span class="o">=</span> <span class="n">arr</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="n">datasets</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">_to_temp_dataset</span><span class="p">())</span>

<span class="n">ds</span> <span class="o">=</span> <span class="n">_dataset_concat</span><span class="p">(</span>
Expand Down
3 changes: 3 additions & 0 deletions _modules/xarray/core/merge.html
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@ <h1>Source code for xarray.core.merge</h1><div class="highlight"><pre>
<span class="n">dims</span> <span class="o">=</span> <span class="n">calculate_dimensions</span><span class="p">(</span><span class="n">variables</span><span class="p">)</span>

<span class="n">coord_names</span><span class="p">,</span> <span class="n">noncoord_names</span> <span class="o">=</span> <span class="n">determine_coords</span><span class="p">(</span><span class="n">coerced</span><span class="p">)</span>
<span class="k">if</span> <span class="n">compat</span> <span class="o">==</span> <span class="s2">&quot;minimal&quot;</span><span class="p">:</span>
<span class="c1"># coordinates may be dropped in merged results</span>
<span class="n">coord_names</span><span class="o">.</span><span class="n">intersection_update</span><span class="p">(</span><span class="n">variables</span><span class="p">)</span>
<span class="k">if</span> <span class="n">explicit_coords</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">assert_valid_explicit_coords</span><span class="p">(</span><span class="n">variables</span><span class="p">,</span> <span class="n">dims</span><span class="p">,</span> <span class="n">explicit_coords</span><span class="p">)</span>
<span class="n">coord_names</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">explicit_coords</span><span class="p">)</span>
Expand Down
4 changes: 1 addition & 3 deletions _modules/xugrid/plot/plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,14 @@ <h1>Source code for xugrid.plot.plot</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">functools</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">from</span> <span class="nn">xarray.plot.facetgrid</span> <span class="kn">import</span> <span class="n">_easy_facetgrid</span>
<span class="kn">from</span> <span class="nn">xarray.plot.utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">_add_colorbar</span><span class="p">,</span>
<span class="n">_ensure_plottable</span><span class="p">,</span>
<span class="n">_process_cmap_cbar_kwargs</span><span class="p">,</span>
<span class="n">_update_axes</span><span class="p">,</span>
<span class="n">get_axis</span><span class="p">,</span>
<span class="n">import_matplotlib_pyplot</span><span class="p">,</span>
<span class="n">label_from_attrs</span><span class="p">,</span>
<span class="p">)</span>

Expand Down Expand Up @@ -642,8 +642,6 @@ <h1>Source code for xugrid.plot.plot</h1><div class="highlight"><pre>
<span class="n">allargs</span><span class="p">[</span><span class="s2">&quot;plotfunc&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">globals</span><span class="p">()[</span><span class="n">plotfunc</span><span class="o">.</span><span class="vm">__name__</span><span class="p">]</span>
<span class="k">return</span> <span class="n">_easy_facetgrid</span><span class="p">(</span><span class="n">darray</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="s2">&quot;dataarray&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">allargs</span><span class="p">)</span>

<span class="n">plt</span> <span class="o">=</span> <span class="n">import_matplotlib_pyplot</span><span class="p">()</span>

<span class="c1"># For 3d plot, ensure given ax is a Axes3D object</span>
<span class="k">if</span> <span class="p">(</span>
<span class="n">plotfunc</span><span class="o">.</span><span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;surface&quot;</span>
Expand Down
4 changes: 2 additions & 2 deletions _sources/examples-dev/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

Computation times
=================
**00:01.637** total execution time for **examples-dev** files:
**00:01.589** total execution time for **examples-dev** files:

+----------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.637 | 0.0 MB |
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.589 | 0.0 MB |
+----------------------------------------------------------+-----------+--------+
2 changes: 1 addition & 1 deletion _sources/examples-dev/voronoi.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ The figure shows:
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.637 seconds)
**Total running time of the script:** (0 minutes 1.589 seconds)


.. _sphx_glr_download_examples-dev_voronoi.py:
Expand Down
24 changes: 12 additions & 12 deletions _sources/examples/connectivity.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ By default, the border value for binary erosion is set to ``False`` (equal to
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f75294fb100>
<matplotlib.collections.PolyCollection object at 0x7f30c6581940>
Expand Down Expand Up @@ -165,7 +165,7 @@ start by setting a single value in the center of the grid to ``True``.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f752a9d64c0>
<matplotlib.collections.PolyCollection object at 0x7f30c4e8f9d0>
Expand Down Expand Up @@ -200,7 +200,7 @@ alternative border value:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f75359c8340>
<matplotlib.collections.PolyCollection object at 0x7f30d0faf820>
Expand Down Expand Up @@ -238,7 +238,7 @@ analyse connected parts of the mesh.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f752a31cbe0>
<matplotlib.collections.PolyCollection object at 0x7f30c4f35100>
Expand Down Expand Up @@ -272,7 +272,7 @@ Tesselation.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f752a0f2700>
<matplotlib.collections.LineCollection object at 0x7f30ce71fb80>
Expand Down Expand Up @@ -316,7 +316,7 @@ the original.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f752a250790>
<matplotlib.collections.LineCollection object at 0x7f30c5467c70>
Expand Down Expand Up @@ -355,7 +355,7 @@ We can break down one of the Voronoi tesselations from above into triangles:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f752925ba60>
<matplotlib.collections.LineCollection object at 0x7f30c5a55f40>
Expand Down Expand Up @@ -409,7 +409,7 @@ the upper and lower parts:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f7529eb6f10>
<matplotlib.collections.LineCollection object at 0x7f30d0765490>
Expand Down Expand Up @@ -439,7 +439,7 @@ We can now use Laplace interpolation to fill the gaps in the grid.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f75362c2ca0>
<matplotlib.collections.PolyCollection object at 0x7f30c5988e20>
Expand Down Expand Up @@ -480,7 +480,7 @@ To illustrate, let's take a look at the connectivity matrix of the Xoxo grid.
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f752af59f70>
<matplotlib.image.AxesImage object at 0x7f30c5bb9550>
Expand Down Expand Up @@ -516,14 +516,14 @@ locality:
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f7528fbcbe0>
<matplotlib.image.AxesImage object at 0x7f30ce6864f0>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.675 seconds)
**Total running time of the script:** (0 minutes 1.591 seconds)


.. _sphx_glr_download_examples_connectivity.py:
Expand Down
10 changes: 5 additions & 5 deletions _sources/examples/overlap_regridder.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ some bathymetry) of the Netherlands, and a coarser target grid.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f7529f45e20>
<matplotlib.collections.LineCollection object at 0x7f30c4bdadc0>
Expand Down Expand Up @@ -204,7 +204,7 @@ conservative methods, such as conductance:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f7529efd670>
<matplotlib.collections.PolyCollection object at 0x7f30c4cc4910>
Expand Down Expand Up @@ -282,7 +282,7 @@ To use our custom method, we provide at initialization of the OverlapRegridder:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f752acdc6d0>
<matplotlib.collections.PolyCollection object at 0x7f30d0af2970>
Expand Down Expand Up @@ -322,7 +322,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f752a67ac40>
<matplotlib.collections.PolyCollection object at 0x7f30c3fca9d0>
Expand All @@ -333,7 +333,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 5.224 seconds)
**Total running time of the script:** (0 minutes 5.145 seconds)


.. _sphx_glr_download_examples_overlap_regridder.py:
Expand Down
Loading

0 comments on commit 3b9e326

Please sign in to comment.