Skip to content

Commit fadee00

Browse files
committed
Deploying to gh-pages from @ 6b0d9cd 🚀
1 parent 721eafc commit fadee00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2507
-799
lines changed

.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 93385d1d96f12b42c487b13b2caefe6f
3+
config: 4a29c0b57069d2b7f52606562139faad
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_modules/delayedarray/BinaryIsometricOp.html

+28-22
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
66

77
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
8-
<title>delayedarray.BinaryIsometricOp - DelayedArray 0.4.0 documentation</title>
8+
<title>delayedarray.BinaryIsometricOp - DelayedArray 0.5.0 documentation</title>
99
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
1010
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
1111
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=36a5483c" />
@@ -122,7 +122,7 @@
122122
</label>
123123
</div>
124124
<div class="header-center">
125-
<a href="../../index.html"><div class="brand">DelayedArray 0.4.0 documentation</div></a>
125+
<a href="../../index.html"><div class="brand">DelayedArray 0.5.0 documentation</div></a>
126126
</div>
127127
<div class="header-right">
128128
<div class="theme-toggle-container theme-toggle-header">
@@ -145,7 +145,7 @@
145145
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
146146

147147

148-
<span class="sidebar-brand-text">DelayedArray 0.4.0 documentation</span>
148+
<span class="sidebar-brand-text">DelayedArray 0.5.0 documentation</span>
149149

150150
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
151151
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -207,7 +207,7 @@ <h1>Source code for delayedarray.BinaryIsometricOp</h1><div class="highlight"><p
207207
<span class="kn">from</span> <span class="nn">.extract_dense_array</span> <span class="kn">import</span> <span class="n">extract_dense_array</span>
208208
<span class="kn">from</span> <span class="nn">.extract_sparse_array</span> <span class="kn">import</span> <span class="n">extract_sparse_array</span>
209209
<span class="kn">from</span> <span class="nn">.create_dask_array</span> <span class="kn">import</span> <span class="n">create_dask_array</span>
210-
<span class="kn">from</span> <span class="nn">.chunk_shape</span> <span class="kn">import</span> <span class="n">chunk_shape</span>
210+
<span class="kn">from</span> <span class="nn">.chunk_grid</span> <span class="kn">import</span> <span class="n">chunk_grid</span>
211211
<span class="kn">from</span> <span class="nn">.is_sparse</span> <span class="kn">import</span> <span class="n">is_sparse</span>
212212
<span class="kn">from</span> <span class="nn">.is_masked</span> <span class="kn">import</span> <span class="n">is_masked</span>
213213

@@ -345,24 +345,30 @@ <h1>Source code for delayedarray.BinaryIsometricOp</h1><div class="highlight"><p
345345

346346

347347

348-
<div class="viewcode-block" id="chunk_shape_BinaryIsometricOp">
349-
<a class="viewcode-back" href="../../api/delayedarray.html#delayedarray.BinaryIsometricOp.chunk_shape_BinaryIsometricOp">[docs]</a>
350-
<span class="nd">@chunk_shape</span><span class="o">.</span><span class="n">register</span>
351-
<span class="k">def</span> <span class="nf">chunk_shape_BinaryIsometricOp</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">BinaryIsometricOp</span><span class="p">):</span>
352-
<span class="w"> </span><span class="sd">&quot;&quot;&quot;See :py:meth:`~delayedarray.chunk_shape.chunk_shape`.&quot;&quot;&quot;</span>
353-
<span class="n">lchunk</span> <span class="o">=</span> <span class="n">chunk_shape</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_left</span><span class="p">)</span>
354-
<span class="n">rchunk</span> <span class="o">=</span> <span class="n">chunk_shape</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_right</span><span class="p">)</span>
348+
<div class="viewcode-block" id="chunk_grid_BinaryIsometricOp">
349+
<a class="viewcode-back" href="../../api/delayedarray.html#delayedarray.BinaryIsometricOp.chunk_grid_BinaryIsometricOp">[docs]</a>
350+
<span class="nd">@chunk_grid</span><span class="o">.</span><span class="n">register</span>
351+
<span class="k">def</span> <span class="nf">chunk_grid_BinaryIsometricOp</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">BinaryIsometricOp</span><span class="p">):</span>
352+
<span class="w"> </span><span class="sd">&quot;&quot;&quot;See :py:meth:`~delayedarray.chunk_grid.chunk_grid`.&quot;&quot;&quot;</span>
353+
<span class="n">lchunk</span> <span class="o">=</span> <span class="n">chunk_grid</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_left</span><span class="p">)</span>
354+
<span class="n">rchunk</span> <span class="o">=</span> <span class="n">chunk_grid</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_right</span><span class="p">)</span>
355355

356-
<span class="c1"># Not bothering with taking the lowest common denominator, as that</span>
357-
<span class="c1"># might be too aggressive and expanding to the entire matrix size.</span>
358-
<span class="c1"># We instead use the maximum chunk size (which might also expand, e.g.,</span>
359-
<span class="c1"># if you&#39;re combining column-major and row-major matrices; oh well).</span>
360-
<span class="c1"># Just accept that we&#39;ll probably need to break chunks during iteration.</span>
361-
<span class="n">output</span> <span class="o">=</span> <span class="p">[]</span>
362-
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">lchunk</span><span class="p">)):</span>
363-
<span class="n">output</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="n">lchunk</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">rchunk</span><span class="p">[</span><span class="n">i</span><span class="p">]))</span>
364-
365-
<span class="k">return</span> <span class="p">(</span><span class="o">*</span><span class="n">output</span><span class="p">,)</span> </div>
356+
<span class="c1"># Favor the chunking for the more expensive grid, to avoid being penalized</span>
357+
<span class="c1"># heavily from suboptimal chunking for that array. </span>
358+
<span class="c1">#</span>
359+
<span class="c1"># Technically, we could optimize for the case where multiple dimensions</span>
360+
<span class="c1"># have the same boundaries, in which case we should favor full extraction</span>
361+
<span class="c1"># of the other dimensions and just iterate over the common dimensions.</span>
362+
<span class="c1"># This avoids any chunk discrepancies but seems like a pretty unlikely case</span>
363+
<span class="c1"># - if two arrays of the same shape disagree on the chunk boundaries of one</span>
364+
<span class="c1"># dimension, they&#39;d probably disagree on the others as well.</span>
365+
<span class="c1"># </span>
366+
<span class="c1"># The other solution is to figure out some high-dimensional caching scheme</span>
367+
<span class="c1"># for the partially consumed chunks. Sounds like a royal pain.</span>
368+
<span class="k">if</span> <span class="n">lchunk</span><span class="o">.</span><span class="n">cost</span> <span class="o">&gt;</span> <span class="n">rchunk</span><span class="o">.</span><span class="n">cost</span><span class="p">:</span>
369+
<span class="k">return</span> <span class="n">lchunk</span>
370+
<span class="k">else</span><span class="p">:</span>
371+
<span class="k">return</span> <span class="n">rchunk</span></div>
366372

367373

368374

@@ -414,7 +420,7 @@ <h1>Source code for delayedarray.BinaryIsometricOp</h1><div class="highlight"><p
414420

415421
</aside>
416422
</div>
417-
</div><script src="../../_static/documentation_options.js?v=6c02275b"></script>
423+
</div><script src="../../_static/documentation_options.js?v=1dd76d02"></script>
418424
<script src="../../_static/doctools.js?v=888ff710"></script>
419425
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
420426
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>

_modules/delayedarray/Cast.html

+11-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
66

77
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
8-
<title>delayedarray.Cast - DelayedArray 0.4.0 documentation</title>
8+
<title>delayedarray.Cast - DelayedArray 0.5.0 documentation</title>
99
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
1010
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
1111
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=36a5483c" />
@@ -122,7 +122,7 @@
122122
</label>
123123
</div>
124124
<div class="header-center">
125-
<a href="../../index.html"><div class="brand">DelayedArray 0.4.0 documentation</div></a>
125+
<a href="../../index.html"><div class="brand">DelayedArray 0.5.0 documentation</div></a>
126126
</div>
127127
<div class="header-right">
128128
<div class="theme-toggle-container theme-toggle-header">
@@ -145,7 +145,7 @@
145145
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
146146

147147

148-
<span class="sidebar-brand-text">DelayedArray 0.4.0 documentation</span>
148+
<span class="sidebar-brand-text">DelayedArray 0.5.0 documentation</span>
149149

150150
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
151151
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -205,7 +205,7 @@ <h1>Source code for delayedarray.Cast</h1><div class="highlight"><pre>
205205
<span class="kn">from</span> <span class="nn">.extract_dense_array</span> <span class="kn">import</span> <span class="n">extract_dense_array</span>
206206
<span class="kn">from</span> <span class="nn">.extract_sparse_array</span> <span class="kn">import</span> <span class="n">extract_sparse_array</span>
207207
<span class="kn">from</span> <span class="nn">.create_dask_array</span> <span class="kn">import</span> <span class="n">create_dask_array</span>
208-
<span class="kn">from</span> <span class="nn">.chunk_shape</span> <span class="kn">import</span> <span class="n">chunk_shape</span>
208+
<span class="kn">from</span> <span class="nn">.chunk_grid</span> <span class="kn">import</span> <span class="n">chunk_grid</span>
209209
<span class="kn">from</span> <span class="nn">.is_sparse</span> <span class="kn">import</span> <span class="n">is_sparse</span>
210210
<span class="kn">from</span> <span class="nn">.is_masked</span> <span class="kn">import</span> <span class="n">is_masked</span>
211211

@@ -299,12 +299,12 @@ <h1>Source code for delayedarray.Cast</h1><div class="highlight"><pre>
299299

300300

301301

302-
<div class="viewcode-block" id="chunk_shape_Cast">
303-
<a class="viewcode-back" href="../../api/delayedarray.html#delayedarray.Cast.chunk_shape_Cast">[docs]</a>
304-
<span class="nd">@chunk_shape</span><span class="o">.</span><span class="n">register</span>
305-
<span class="k">def</span> <span class="nf">chunk_shape_Cast</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Cast</span><span class="p">):</span>
306-
<span class="w"> </span><span class="sd">&quot;&quot;&quot;See :py:meth:`~delayedarray.chunk_shape.chunk_shape`.&quot;&quot;&quot;</span>
307-
<span class="k">return</span> <span class="n">chunk_shape</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_seed</span><span class="p">)</span></div>
302+
<div class="viewcode-block" id="chunk_grid_Cast">
303+
<a class="viewcode-back" href="../../api/delayedarray.html#delayedarray.Cast.chunk_grid_Cast">[docs]</a>
304+
<span class="nd">@chunk_grid</span><span class="o">.</span><span class="n">register</span>
305+
<span class="k">def</span> <span class="nf">chunk_grid_Cast</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Cast</span><span class="p">):</span>
306+
<span class="w"> </span><span class="sd">&quot;&quot;&quot;See :py:meth:`~delayedarray.chunk_grid.chunk_grid`.&quot;&quot;&quot;</span>
307+
<span class="k">return</span> <span class="n">chunk_grid</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">_seed</span><span class="p">)</span></div>
308308

309309

310310

@@ -356,7 +356,7 @@ <h1>Source code for delayedarray.Cast</h1><div class="highlight"><pre>
356356

357357
</aside>
358358
</div>
359-
</div><script src="../../_static/documentation_options.js?v=6c02275b"></script>
359+
</div><script src="../../_static/documentation_options.js?v=1dd76d02"></script>
360360
<script src="../../_static/doctools.js?v=888ff710"></script>
361361
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
362362
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>

0 commit comments

Comments
 (0)