Skip to content

Commit

Permalink
Deploying to gh-pages from @ 84b5c7a 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Jan 16, 2024
1 parent ccf4060 commit 342f18f
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 212 deletions.
159 changes: 21 additions & 138 deletions Autodiff.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Convert.html
Original file line number Diff line number Diff line change
Expand Up @@ -15617,7 +15617,7 @@ <h2 id="Converting-Tensors">Converting Tensors<a class="anchor-link" href="#Conv


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>2024-01-16 12:05:33.076518: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
<pre>2024-01-16 18:06:33.767031: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
</pre>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion Examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -15215,7 +15215,7 @@ <h3 id="Training-an-MLP">Training an MLP<a class="anchor-link" href="#Training-a


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>2024-01-16 12:05:46.231506: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
<pre>2024-01-16 18:06:46.081958: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
</pre>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion Introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -15349,7 +15349,7 @@ <h2 id="Usage-without-%CE%A6ML's-Tensors">Usage without &#934;<sub>ML</sub>'s Te


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>2024-01-16 12:06:02.139766: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
<pre>2024-01-16 18:07:01.447004: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
</pre>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions Linear_Solves.html
Original file line number Diff line number Diff line change
Expand Up @@ -15910,11 +15910,11 @@ <h2 id="Obtaining-Additional-Information-about-a-Solve">Obtaining Additional Inf


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre>factor_ilu: auto-selecting iterations=1 (eager mode) for matrix <span class="ansi-blue-intense-fg">(2.000, 0.000)</span>; <span class="ansi-blue-intense-fg">(0.000, 1.000)</span> <span class="ansi-green-intense-fg">(b_vecᶜ=2, ~b_vecᵈ=2)</span> (DEBUG), 2024-01-16 12:06:18,573n
<pre>factor_ilu: auto-selecting iterations=1 (eager mode) for matrix <span class="ansi-blue-intense-fg">(2.000, 0.000)</span>; <span class="ansi-blue-intense-fg">(0.000, 1.000)</span> <span class="ansi-green-intense-fg">(b_vecᶜ=2, ~b_vecᵈ=2)</span> (DEBUG), 2024-01-16 18:07:17,624n

Running forward pass of custom op forward &#39;_matrix_solve_forward&#39; given args (&#39;y&#39;,) containing 1 native tensors (DEBUG), 2024-01-16 12:06:18,587n
Running forward pass of custom op forward &#39;_matrix_solve_forward&#39; given args (&#39;y&#39;,) containing 1 native tensors (DEBUG), 2024-01-16 18:07:17,638n

Performing linear solve scipy-CG with tolerance <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (rel), <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (abs), max_iterations=<span class="ansi-blue-intense-fg">1000</span> with backend torch (DEBUG), 2024-01-16 12:06:18,590n
Performing linear solve scipy-CG with tolerance <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (rel), <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (abs), max_iterations=<span class="ansi-blue-intense-fg">1000</span> with backend torch (DEBUG), 2024-01-16 18:07:17,642n

</pre>
</div>
Expand Down Expand Up @@ -16031,9 +16031,9 @@ <h2 id="Linear-Solves-with-Native-Tensors">Linear Solves with Native Tensors<a c


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre>Running forward pass of custom op forward &#39;_matrix_solve_forward&#39; given args (&#39;y&#39;, &#39;matrix&#39;) containing 2 native tensors (DEBUG), 2024-01-16 12:06:18,613n
<pre>Running forward pass of custom op forward &#39;_matrix_solve_forward&#39; given args (&#39;y&#39;, &#39;matrix&#39;) containing 2 native tensors (DEBUG), 2024-01-16 18:07:17,668n

Performing linear solve auto with tolerance <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (rel), <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (abs), max_iterations=<span class="ansi-blue-intense-fg">1000</span> with backend torch (DEBUG), 2024-01-16 12:06:18,616n
Performing linear solve auto with tolerance <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (rel), <span class="ansi-yellow-intense-fg">float64</span> <span class="ansi-blue-intense-fg">1e-05</span> (abs), max_iterations=<span class="ansi-blue-intense-fg">1000</span> with backend torch (DEBUG), 2024-01-16 18:07:17,671n

</pre>
</div>
Expand Down
18 changes: 9 additions & 9 deletions N_Dimensional.html
Original file line number Diff line number Diff line change
Expand Up @@ -15250,7 +15250,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-blue-intense-fg">(0.319, 0.544, 0.576, 0.562, 0.493)</span> along <span class="ansi-green-intense-fg">xˢ</span></pre>
<pre><span class="ansi-blue-intense-fg">(0.363, 0.345, 0.403, 0.235, 0.249)</span> along <span class="ansi-green-intense-fg">xˢ</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15289,7 +15289,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(xˢ=3, yˢ=3)</span> <span class="ansi-blue-intense-fg">0.487 ± 0.109</span> <span class="ansi-white-fg">(4e-01...7e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(xˢ=3, yˢ=3)</span> <span class="ansi-blue-intense-fg">0.647 ± 0.077</span> <span class="ansi-white-fg">(5e-01...7e-01)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15328,7 +15328,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(xˢ=16, yˢ=16, zˢ=16)</span> <span class="ansi-blue-intense-fg">0.498 ± 0.118</span> <span class="ansi-white-fg">(4e-02...9e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(xˢ=16, yˢ=16, zˢ=16)</span> <span class="ansi-blue-intense-fg">0.503 ± 0.117</span> <span class="ansi-white-fg">(1e-01...9e-01)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15479,7 +15479,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-blue-intense-fg">((2.4935489+0j), (-0.9101049-0.18649283j), (0.20880859+0.020689972j), (0.20880859-0.020689972j), (-0.9101049+0.18649283j))</span> along <span class="ansi-green-intense-fg">xˢ</span> <span class="ansi-yellow-intense-fg">complex64</span></pre>
<pre><span class="ansi-blue-intense-fg">((1.5947771+0j), (0.09790179-0.61384934j), (-0.09835342-0.12868941j), (-0.09835342+0.12868941j), (0.09790179+0.61384934j))</span> along <span class="ansi-green-intense-fg">xˢ</span> <span class="ansi-yellow-intense-fg">complex64</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15518,7 +15518,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(xˢ=3, yˢ=3)</span> <span class="ansi-yellow-intense-fg">complex64</span> <span class="ansi-blue-intense-fg">|...| &lt; 4.381699562072754</span></pre>
<pre><span class="ansi-green-intense-fg">(xˢ=3, yˢ=3)</span> <span class="ansi-yellow-intense-fg">complex64</span> <span class="ansi-blue-intense-fg">|...| &lt; 5.826732158660889</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15557,7 +15557,7 @@ <h2 id="Grids">Grids<a class="anchor-link" href="#Grids">&#182;</a></h2><p>Grids


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(xˢ=16, yˢ=16, zˢ=16)</span> <span class="ansi-yellow-intense-fg">complex64</span> <span class="ansi-blue-intense-fg">|...| &lt; 2040.0184326171875</span></pre>
<pre><span class="ansi-green-intense-fg">(xˢ=16, yˢ=16, zˢ=16)</span> <span class="ansi-yellow-intense-fg">complex64</span> <span class="ansi-blue-intense-fg">|...| &lt; 2059.898193359375</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15672,7 +15672,7 @@ <h2 id="Dimensions-as-Components">Dimensions as Components<a class="anchor-link"


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.205 ± 0.177</span> <span class="ansi-white-fg">(0e+00...5e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.141 ± 0.130</span> <span class="ansi-white-fg">(0e+00...4e-01)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15711,7 +15711,7 @@ <h2 id="Dimensions-as-Components">Dimensions as Components<a class="anchor-link"


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.255 ± 0.236</span> <span class="ansi-white-fg">(0e+00...6e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.462 ± 0.311</span> <span class="ansi-white-fg">(0e+00...9e-01)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15750,7 +15750,7 @@ <h2 id="Dimensions-as-Components">Dimensions as Components<a class="anchor-link"


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.408 ± 0.270</span> <span class="ansi-white-fg">(0e+00...8e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(othersⁱ=4, pointsⁱ=4)</span> <span class="ansi-blue-intense-fg">0.408 ± 0.288</span> <span class="ansi-white-fg">(0e+00...9e-01)</span></pre>
</div>

</div>
Expand Down
32 changes: 16 additions & 16 deletions Networks.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -15452,7 +15452,7 @@ <h2 id="Dimension-Types">Dimension Types<a class="anchor-link" href="#Dimension-


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(xˢ=28, yˢ=28)</span> <span class="ansi-blue-intense-fg">0.491 ± 0.281</span> <span class="ansi-white-fg">(1e-04...1e+00)</span></pre>
<pre><span class="ansi-green-intense-fg">(xˢ=28, yˢ=28)</span> <span class="ansi-blue-intense-fg">0.493 ± 0.284</span> <span class="ansi-white-fg">(4e-04...1e+00)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15533,7 +15533,7 @@ <h2 id="Automatic-Reshaping">Automatic Reshaping<a class="anchor-link" href="#Au


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-blue-intense-fg">(-2.389, -1.126, 0.542, 0.239, 0.096, -4.021)</span> <span class="ansi-green-intense-fg">(aᶜ=2, bᶜ=3)</span></pre>
<pre><span class="ansi-blue-intense-fg">(1.613, 1.223, 1.296, -0.826, 0.558, -0.559)</span> <span class="ansi-green-intense-fg">(aᶜ=2, bᶜ=3)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15589,7 +15589,7 @@ <h2 id="Automatic-Reshaping">Automatic Reshaping<a class="anchor-link" href="#Au


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-blue-intense-fg">(-0.411, -1.557, -3.492, -0.274, -1.420, -3.355)</span> <span class="ansi-green-intense-fg">(aᶜ=2, bᶜ=3)</span></pre>
<pre><span class="ansi-blue-intense-fg">(-1.220, -0.997, -0.538, 0.073, 0.296, 0.755)</span> <span class="ansi-green-intense-fg">(aᶜ=2, bᶜ=3)</span></pre>
</div>

</div>
Expand Down
70 changes: 35 additions & 35 deletions Tensors.html
Original file line number Diff line number Diff line change
Expand Up @@ -15232,7 +15232,7 @@ <h2 id="Named-Dimensions">Named Dimensions<a class="anchor-link" href="#Named-Di


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(examplesᵇ=2, xˢ=4, yˢ=3)</span> <span class="ansi-blue-intense-fg">0.454 ± 0.264</span> <span class="ansi-white-fg">(4e-03...9e-01)</span></pre>
<pre><span class="ansi-green-intense-fg">(examplesᵇ=2, xˢ=4, yˢ=3)</span> <span class="ansi-blue-intense-fg">0.536 ± 0.311</span> <span class="ansi-white-fg">(1e-03...1e+00)</span></pre>
</div>

</div>
Expand Down Expand Up @@ -15283,7 +15283,7 @@ <h2 id="Printing-Options">Printing Options<a class="anchor-link" href="#Printing


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">(examplesᵇ=2, xˢ=4, yˢ=3)</span> <span class="ansi-yellow-intense-fg">float32</span> <span class="ansi-blue-intense-fg">4.53941e-01 ± 2.63517e-01</span> <span class="ansi-white-fg">(3.64717e-03...9.38198e-01)</span>
<pre><span class="ansi-green-intense-fg">(examplesᵇ=2, xˢ=4, yˢ=3)</span> <span class="ansi-yellow-intense-fg">float32</span> <span class="ansi-blue-intense-fg">5.35659e-01 ± 3.11268e-01</span> <span class="ansi-white-fg">(1.37733e-03...9.90407e-01)</span>
</pre>
</div>
</div>
Expand Down Expand Up @@ -15321,13 +15321,13 @@ <h2 id="Printing-Options">Printing Options<a class="anchor-link" href="#Printing

<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre><span class="ansi-green-intense-fg">examples=0</span>
<span class="ansi-blue-intense-fg"> 0.446, 0.433, 0.140, 0.551,
0.368, 0.403, 0.004, 0.634,
0.365, 0.168, 0.437, 0.578</span> along <span class="ansi-green-intense-fg">(xˢ=4, yˢ=3)</span>
<span class="ansi-blue-intense-fg"> 0.689, 0.012, 0.578, 0.579,
0.530, 0.057, 0.395, 0.393,
0.791, 0.862, 0.236, 0.019</span> along <span class="ansi-green-intense-fg">(xˢ=4, yˢ=3)</span>
<span class="ansi-green-intense-fg">examples=1</span>
<span class="ansi-blue-intense-fg"> 0.014, 0.938, 0.842, 0.009,
0.388, 0.708, 0.397, 0.561,
0.243, 0.887, 0.654, 0.728</span> along <span class="ansi-green-intense-fg">(xˢ=4, yˢ=3)</span>
<span class="ansi-blue-intense-fg"> 0.667, 0.930, 0.733, 0.397,
0.793, 0.793, 0.724, 0.990,
0.743, 0.848, 0.001, 0.095</span> along <span class="ansi-green-intense-fg">(xˢ=4, yˢ=3)</span>
</pre>
</div>
</div>
Expand Down Expand Up @@ -15364,15 +15364,15 @@ <h2 id="Printing-Options">Printing Options<a class="anchor-link" href="#Printing


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre>[[[0.36 0.37 0.45]
[0.17 0.40 0.43]
[0.44 0.00 0.14]
[0.58 0.63 0.55]]

[[0.24 0.39 0.01]
[0.89 0.71 0.94]
[0.65 0.40 0.84]
[0.73 0.56 0.01]]]
<pre>[[[0.79 0.53 0.69]
[0.86 0.06 0.01]
[0.24 0.39 0.58]
[0.02 0.39 0.58]]

[[0.74 0.79 0.67]
[0.85 0.79 0.93]
[0.00 0.72 0.73]
[0.09 0.99 0.40]]]
</pre>
</div>
</div>
Expand Down Expand Up @@ -15506,15 +15506,15 @@ <h2 id="Wrapping-and-Unwrapping">Wrapping and Unwrapping<a class="anchor-link" h


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre>array([[[0.36487314, 0.36784124, 0.44646147],
[0.1677112 , 0.402599 , 0.43253064],
[0.4374001 , 0.00364717, 0.14032038],
[0.57777125, 0.6337933 , 0.55093855]],

[[0.24308409, 0.38803834, 0.0136689 ],
[0.8869236 , 0.7077302 , 0.93819827],
[0.6538978 , 0.39743719, 0.8418259 ],
[0.7280686 , 0.56125283, 0.00857372]]], dtype=float32)</pre>
<pre>array([[[0.7912768 , 0.5295594 , 0.68935823],
[0.8620336 , 0.05677759, 0.0121208 ],
[0.2363926 , 0.39483085, 0.57766247],
[0.01904197, 0.3933064 , 0.57885 ]],

[[0.7433095 , 0.7933729 , 0.6670343 ],
[0.8480023 , 0.79263425, 0.9297077 ],
[0.00137733, 0.7241636 , 0.73309934],
[0.09466182, 0.99040705, 0.3968439 ]]], dtype=float32)</pre>
</div>

</div>
Expand Down Expand Up @@ -15565,15 +15565,15 @@ <h2 id="Wrapping-and-Unwrapping">Wrapping and Unwrapping<a class="anchor-link" h


<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre>array([[[0.36487314, 0.36784124, 0.44646147],
[0.1677112 , 0.402599 , 0.43253064],
[0.4374001 , 0.00364717, 0.14032038],
[0.57777125, 0.6337933 , 0.55093855]],

[[0.24308409, 0.38803834, 0.0136689 ],
[0.8869236 , 0.7077302 , 0.93819827],
[0.6538978 , 0.39743719, 0.8418259 ],
[0.7280686 , 0.56125283, 0.00857372]]], dtype=float32)</pre>
<pre>array([[[0.7912768 , 0.5295594 , 0.68935823],
[0.8620336 , 0.05677759, 0.0121208 ],
[0.2363926 , 0.39483085, 0.57766247],
[0.01904197, 0.3933064 , 0.57885 ]],

[[0.7433095 , 0.7933729 , 0.6670343 ],
[0.8480023 , 0.79263425, 0.9297077 ],
[0.00137733, 0.7241636 , 0.73309934],
[0.09466182, 0.99040705, 0.3968439 ]]], dtype=float32)</pre>
</div>

</div>
Expand Down
11 changes: 8 additions & 3 deletions phiml/math/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3835,12 +3835,17 @@ <h2 id="returns">Returns</h2>
warnings.warn(f&#34;Indexing without item names is not recommended. Got indices {indices.shape}&#34;, SyntaxWarning, stacklevel=2)
assert values.shape.instance.is_empty or values.shape.spatial.is_empty, f&#34;Specify gather dimensions for values with both instance and spatial dimensions. Got {values.shape}&#34;
dims = values.shape.instance if values.shape.spatial.is_empty else values.shape.spatial
if indices.dtype.kind == bool:
indices = to_int32(indices)
assert dims, f&#34;Specify gather dimensions for values with neither instance nor spatial dimensions. Got {values.shape}&#34;
dims = parse_dim_order(dims)
assert dims, f&#34;No indexing dimensions for tensor {values.shape} given indices {indices.shape}&#34;
if dims not in values.shape:
return expand(values, non_channel(indices))
if len(dims) &gt; 1:
assert channel(indices).rank &gt; 0, f&#34;indices must have a channel dimension listing the indexed dims {dims} but got {indices.shape}. You can create it via vec({&#39;, &#39;.join([d+&#39;=...&#39; for d in dims])}) or channel(index=&#39;{&#39;,&#39;.join(dims)}&#39;). If you have raveled indices, use unpack_dim(indices, channel, values.shape[&#39;{&#39;,&#39;.join(dims)}&#39;]).&#34;
assert channel(indices).rank == 1, f&#34;indices must have a single channel dimension listing the indexed dims {dims} but got {indices.shape}.&#34;
assert channel(indices).volume == len(dims), f&#34;channel dim of indices must have size equal to the number of indexed dims {dims} but got {channel(indices)} which has {channel(indices).volume} entries&#34;
if indices.dtype.kind == bool:
indices = to_int32(indices)
if values._is_tracer or is_sparse(values):
if not channel(indices):
indices = expand(indices, channel(gather=dims))
Expand Down Expand Up @@ -8766,8 +8771,8 @@ <h2 id="returns">Returns</h2>
indices = indices[{channel: grid_shape.only(indexed_dims).names}]
indexed_dims = grid_shape.only(indexed_dims)
else:
assert channel(indices).rank == 1 or (grid_shape.spatial_rank + grid_shape.instance_rank == 1 and indices.shape.channel_rank == 0)
indexed_dims = grid_shape.spatial or grid_shape.instance
assert channel(indices).rank == 1 or (grid_shape.spatial_rank + grid_shape.instance_rank == 1 and indices.shape.channel_rank == 0), f&#34;indices must have a channel dimension listing the indexed dims {indexed_dims} but got {indices.shape}. You can create it via vec({&#39;, &#39;.join([d+&#39;=...&#39; for d in indexed_dims.names])}) or channel(index=&#39;{&#39;,&#39;.join(indexed_dims.names)}&#39;). If you have raveled indices, use unpack_dim(indices, channel, base_grid.shape[&#39;{&#39;,&#39;.join(indexed_dims.names)}&#39;]).&#34;
assert channel(indices).volume == indexed_dims.rank
values = wrap(values)
batches = values.shape.non_channel.non_instance &amp; indices.shape.non_channel.non_instance
Expand Down

0 comments on commit 342f18f

Please sign in to comment.