Skip to content

Commit

Permalink
deploy: 2685709
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikKok committed Jul 14, 2023
1 parent e73db85 commit 14dd2a4
Show file tree
Hide file tree
Showing 55 changed files with 294 additions and 295 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: 41b471fb9f955ce9b60e9a6afd82478e
config: 51b00bc5cf129f0cdb92ff41214df90d
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified _images/sphx_glr_connectivity_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_connectivity_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_connectivity_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_connectivity_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_disk_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_disk_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_plotting_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_quick_overview_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/sphx_glr_voronoi_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions _modules/xugrid/regrid/regridder.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,9 @@ <h1>Source code for xugrid.regrid.regridder</h1><div class="highlight"><pre>

<span class="n">DaskArray</span> <span class="o">=</span> <span class="n">dask</span><span class="o">.</span><span class="n">array</span><span class="o">.</span><span class="n">Array</span>
<span class="n">DaskRechunk</span> <span class="o">=</span> <span class="n">dask</span><span class="o">.</span><span class="n">array</span><span class="o">.</span><span class="n">rechunk</span>
<span class="n">DaskReshape</span> <span class="o">=</span> <span class="n">dask</span><span class="o">.</span><span class="n">array</span><span class="o">.</span><span class="n">reshape</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">DaskArray</span> <span class="o">=</span> <span class="p">()</span>
<span class="n">DaskRechunk</span> <span class="o">=</span> <span class="p">()</span>
<span class="n">DaskReshape</span> <span class="o">=</span> <span class="p">()</span>

<span class="kn">import</span> <span class="nn">xugrid</span>
<span class="kn">from</span> <span class="nn">xugrid.constants</span> <span class="kn">import</span> <span class="n">FloatArray</span>
Expand Down Expand Up @@ -525,8 +523,6 @@ <h1>Source code for xugrid.regrid.regridder</h1><div class="highlight"><pre>
<span class="n">source</span> <span class="o">=</span> <span class="n">source</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">source_grid</span><span class="o">.</span><span class="n">size</span><span class="p">))</span>

<span class="n">size</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_target</span><span class="o">.</span><span class="n">size</span>
<span class="c1"># E.g.: sizes of (&quot;time&quot;, &quot;layer&quot;) + (&quot;y&quot;, &quot;x&quot;)</span>
<span class="n">out_shape</span> <span class="o">=</span> <span class="n">first_dims_shape</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_target</span><span class="o">.</span><span class="n">shape</span>

<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">DaskArray</span><span class="p">):</span>
<span class="c1"># for DaskArray&#39;s from multiple partitions, rechunk first to single size per dimension</span>
Expand All @@ -542,16 +538,19 @@ <h1>Source code for xugrid.regrid.regridder</h1><div class="highlight"><pre>
<span class="n">chunks</span><span class="o">=</span><span class="n">chunks</span><span class="p">,</span>
<span class="n">meta</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">((),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">source</span><span class="o">.</span><span class="n">dtype</span><span class="p">),</span>
<span class="p">)</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">out</span><span class="o">.</span><span class="n">compute</span><span class="p">()</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">out_shape</span><span class="p">)</span>
<span class="c1"># TODO: for now we compute first, since .reshape and dask.array.reshape</span>
<span class="c1"># does not reshapes the underlying data somehow. This need to be evaluated.</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">out</span><span class="o">.</span><span class="n">compute</span><span class="p">()</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">):</span>
<span class="n">out</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_regrid</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_weights</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">out</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">out_shape</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span>
<span class="s2">&quot;Expected dask.array.Array or numpy.ndarray. Received: &quot;</span>
<span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">source</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">out</span>
<span class="c1"># E.g.: sizes of (&quot;time&quot;, &quot;layer&quot;) + (&quot;y&quot;, &quot;x&quot;)</span>
<span class="n">out_shape</span> <span class="o">=</span> <span class="n">first_dims_shape</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_target</span><span class="o">.</span><span class="n">shape</span>
<span class="k">return</span> <span class="n">out</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">out_shape</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">regrid_dataarray</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">:</span> <span class="n">xr</span><span class="o">.</span><span class="n">DataArray</span><span class="p">,</span> <span class="n">source_dims</span><span class="p">:</span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">]):</span>
<span class="c1"># Do not set vectorize=True: numba will run the for loop more</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:02.366** total execution time for **examples-dev** files:
**00:01.786** total execution time for **examples-dev** files:

+----------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:02.366 | 0.0 MB |
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.786 | 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 2.366 seconds)
**Total running time of the script:** ( 0 minutes 1.786 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 0x7f6064be7b80>
<matplotlib.collections.PolyCollection object at 0x7ff7e21e1bb0>
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 0x7f60653e87c0>
<matplotlib.collections.PolyCollection object at 0x7ff7e3adb430>
Expand Down Expand Up @@ -200,7 +200,7 @@ alternative border value:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f6064b6f5e0>
<matplotlib.collections.PolyCollection object at 0x7ff7e31103d0>
Expand Down Expand Up @@ -238,7 +238,7 @@ analyse connected parts of the mesh.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f606517ff10>
<matplotlib.collections.PolyCollection object at 0x7ff7e2d2bfd0>
Expand Down Expand Up @@ -272,7 +272,7 @@ Tesselation.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f606450b400>
<matplotlib.collections.LineCollection object at 0x7ff7e31cdfd0>
Expand Down Expand Up @@ -316,7 +316,7 @@ the original.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f6063422880>
<matplotlib.collections.LineCollection object at 0x7ff7e3bee940>
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 0x7f606e0efaf0>
<matplotlib.collections.LineCollection object at 0x7ff7e34b5bb0>
Expand Down Expand Up @@ -409,7 +409,7 @@ the upper and lower parts:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f606e31ab50>
<matplotlib.collections.LineCollection object at 0x7ff7e2c6cc10>
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 0x7f60652c52b0>
<matplotlib.collections.PolyCollection object at 0x7ff7e2fd5370>
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 0x7f606df68ca0>
<matplotlib.image.AxesImage object at 0x7ff7ec8e2d60>
Expand Down Expand Up @@ -516,14 +516,14 @@ locality:
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f60648f2c10>
<matplotlib.image.AxesImage object at 0x7ff7e3275940>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 2.422 seconds)
**Total running time of the script:** ( 0 minutes 1.835 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 0x7f60646cf970>
<matplotlib.collections.LineCollection object at 0x7ff7e2dd4cd0>
Expand Down Expand Up @@ -204,7 +204,7 @@ conservative methods, such as conductance:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f60633e3af0>
<matplotlib.collections.PolyCollection object at 0x7ff7e2316b80>
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 0x7f60636cad60>
<matplotlib.collections.PolyCollection object at 0x7ff7e3a67e20>
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 0x7f6065212cd0>
<matplotlib.collections.PolyCollection object at 0x7ff7e3ccd910>
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 7.128 seconds)
**Total running time of the script:** ( 0 minutes 5.416 seconds)


.. _sphx_glr_download_examples_overlap_regridder.py:
Expand Down
Loading

0 comments on commit 14dd2a4

Please sign in to comment.