<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheterminal">Runs a basic file explorer in the terminal:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> curses, os
<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheconsole">Runs a basic file explorer in the console:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> curses, os
<pre><codeclass="python language-python hljs"><array> = np.array(<Image>) <spanclass="hljs-comment"># Creates NumPy array from the image.</span>
<pre><codeclass="python language-python hljs"><array> = np.array(<Image>) <spanclass="hljs-comment"># Creates a NumPy array from the image.</span>
<Image> = Image.fromarray(np.uint8(<array>)) <spanclass="hljs-comment"># Use <array>.clip(0, 255) to clip values.</span>
<Image> = Image.fromarray(np.uint8(<array>)) <spanclass="hljs-comment"># Use <array>.clip(0, 255) to clip values.</span>
</code></pre>
</code></pre>
<div><h3id="modes-1">Modes</h3><ul>
<div><h3id="modes-1">Modes</h3><ul>
@ -2638,7 +2638,7 @@ b <span class="hljs-number">3</span> <span class="hljs-number">4</span>
<DF> = <DF>[row_bools] <spanclass="hljs-comment"># Keeps rows as specified by bools.</span>
<DF> = <DF>[row_bools] <spanclass="hljs-comment"># Keeps rows as specified by bools.</span>
<DF> = <DF>[<DF_of_bools>] <spanclass="hljs-comment"># Assigns NaN to values that are False in bools.</span>
<DF> = <DF>[<DF_of_bools>] <spanclass="hljs-comment"># Assigns NaN to items that are False in bools.</span>
</code></pre>
</code></pre>
<pre><codeclass="python language-python hljs"><DF> = <DF>><el/Sr/DF><spanclass="hljs-comment"># Returns DF of bools. Sr is treated as a row.</span>
<pre><codeclass="python language-python hljs"><DF> = <DF>><el/Sr/DF><spanclass="hljs-comment"># Returns DF of bools. Sr is treated as a row.</span>
<DF> = <DF> + <el/Sr/DF><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
<DF> = <DF> + <el/Sr/DF><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>