Skip to content

Commit

Permalink
deploy: 6ad2b2b
Browse files Browse the repository at this point in the history
  • Loading branch information
philippeller committed Jul 28, 2024
1 parent 2d019c0 commit 28bc3bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _modules/pisa/utils/plotter.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ <h1>Source code for pisa.utils.plotter</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">&#39;Expecting to plot a MapSet but &#39;</span>
<span class="s1">&#39;got </span><span class="si">%s</span><span class="s1">&#39;</span><span class="o">%</span><span class="nb">type</span><span class="p">(</span><span class="n">map_set</span><span class="p">))</span>
<span class="k">if</span> <span class="n">n_rows</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">n_cols</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># TODO: auto row/cols</span>
<span class="n">n_rows</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">floor</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">))</span>
<span class="n">n_rows</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">floor</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">)))</span>
<span class="k">while</span> <span class="n">n</span> <span class="o">%</span> <span class="n">n_rows</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">n_rows</span> <span class="o">-=</span> <span class="mi">1</span>
<span class="n">n_cols</span> <span class="o">=</span> <span class="n">n</span> <span class="o">//</span> <span class="n">n_rows</span>
Expand Down

0 comments on commit 28bc3bb

Please sign in to comment.