Skip to content

Commit

Permalink
deploy: aa36126
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 25, 2024
1 parent 56e9b78 commit 81fdc4b
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 98 deletions.
10 changes: 3 additions & 7 deletions api/_modules/aepsych/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,11 @@ <h1>Source code for aepsych.utils</h1><div class="highlight"><pre>

<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="n">dim</span><span class="p">):</span>
<span class="k">if</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">slice_dims</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="n">torch</span><span class="o">.</span><span class="n">tensor</span><span class="p">([</span><span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="mf">1e-10</span><span class="p">])</span>
<span class="p">)</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">slice</span><span class="p">(</span><span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">torch</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="n">lower</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">upper</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">gridsize</span><span class="p">))</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">slice</span><span class="p">(</span><span class="n">lower</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">upper</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">gridsize</span> <span class="o">*</span> <span class="mi">1</span><span class="n">j</span><span class="p">))</span>

<span class="k">return</span> <span class="n">torch</span><span class="o">.</span><span class="n">stack</span><span class="p">(</span><span class="n">torch</span><span class="o">.</span><span class="n">meshgrid</span><span class="p">(</span><span class="o">*</span><span class="n">mesh_vals</span><span class="p">,</span> <span class="n">indexing</span><span class="o">=</span><span class="s2">"ij"</span><span class="p">),</span> <span class="n">dim</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</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">dim</span>
<span class="p">)</span></div>
<span class="k">return</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">mgrid</span><span class="p">[</span><span class="n">mesh_vals</span><span class="p">]</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">dim</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">T</span><span class="p">)</span></div>


<span class="k">def</span> <span class="nf">_process_bounds</span><span class="p">(</span>
Expand Down
10 changes: 3 additions & 7 deletions api/_modules/aepsych/utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,11 @@ <h1>Source code for aepsych.utils</h1><div class="highlight"><pre>

<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="n">dim</span><span class="p">):</span>
<span class="k">if</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">slice_dims</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="n">torch</span><span class="o">.</span><span class="n">tensor</span><span class="p">([</span><span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="mf">1e-10</span><span class="p">])</span>
<span class="p">)</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">slice</span><span class="p">(</span><span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="n">slice_dims</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">torch</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="n">lower</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">upper</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">gridsize</span><span class="p">))</span>
<span class="n">mesh_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">slice</span><span class="p">(</span><span class="n">lower</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">upper</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">item</span><span class="p">(),</span> <span class="n">gridsize</span> <span class="o">*</span> <span class="mi">1</span><span class="n">j</span><span class="p">))</span>

<span class="k">return</span> <span class="n">torch</span><span class="o">.</span><span class="n">stack</span><span class="p">(</span><span class="n">torch</span><span class="o">.</span><span class="n">meshgrid</span><span class="p">(</span><span class="o">*</span><span class="n">mesh_vals</span><span class="p">,</span> <span class="n">indexing</span><span class="o">=</span><span class="s2">"ij"</span><span class="p">),</span> <span class="n">dim</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</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">dim</span>
<span class="p">)</span></div>
<span class="k">return</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">mgrid</span><span class="p">[</span><span class="n">mesh_vals</span><span class="p">]</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">dim</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">T</span><span class="p">)</span></div>


<span class="k">def</span> <span class="nf">_process_bounds</span><span class="p">(</span>
Expand Down
2 changes: 1 addition & 1 deletion demos/ParticleEffectDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=d5127a73"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=61d2920d"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Particle-Effect-Demo">Particle Effect Demo<a class="anchor-link" href="#Particle-Effect-Demo"></a></h2><video controls="" muted="" style="width: 100%;">
Expand Down
2 changes: 1 addition & 1 deletion demos/ParticleEffectDemo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=d5127a73"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=61d2920d"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Particle-Effect-Demo">Particle Effect Demo<a class="anchor-link" href="#Particle-Effect-Demo"></a></h2><video controls="" muted="" style="width: 100%;">
Expand Down
2 changes: 1 addition & 1 deletion demos/ThrowOptimizerDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=50ce49c5"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=bf7d7975"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="VR-Throw-Optimizer-Demo">VR Throw Optimizer Demo<a class="anchor-link" href="#VR-Throw-Optimizer-Demo"></a></h2><video controls="" muted="" style="width: 100%;">
Expand Down
2 changes: 1 addition & 1 deletion demos/ThrowOptimizerDemo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=50ce49c5"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=bf7d7975"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="VR-Throw-Optimizer-Demo">VR Throw Optimizer Demo<a class="anchor-link" href="#VR-Throw-Optimizer-Demo"></a></h2><video controls="" muted="" style="width: 100%;">
Expand Down
2 changes: 1 addition & 1 deletion demos/YannyLaurelDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=784b03f8"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=cbbb2ab3"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p># Yanny-Laurel Threshold Demo</p>
Expand Down
2 changes: 1 addition & 1 deletion demos/YannyLaurelDemo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<div class="notebook">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=784b03f8"><div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered" id="cell-id=cbbb2ab3"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p># Yanny-Laurel Threshold Demo</p>
Expand Down
Loading

0 comments on commit 81fdc4b

Please sign in to comment.