selected += (ch == KEY_DOWN) and (selected <len(paths)-1)
first = min(first, selected)
first = max(first, selected - (height-1))
first -= (first > selected)
first += (first <selected-(height-1))
if ch in [KEY_LEFT, KEY_RIGHT, KEY_ENTER, ord('\n'), ord('\r')]:
new_dir = '..' if ch == KEY_LEFT else paths[selected]
if os.path.isdir(new_dir):
@ -2703,8 +2703,7 @@ import numpy as np
<1/2d_arr> = <2d>[<2d/1d_bools>] # 1d_bools must have size of a column.
```
* **`':'` returns a slice of all dimension's indices. Omitted dimensions default to `':'`.**
* **Python converts `'obj[i, j]'` to `'obj[(i, j)]'`. This makes `'<2d>[row_i, col_i]'` and `'<2d>[row_indices]'` indistinguishable to NumPy if tuple of indices is passed!**
* **Indexing with a slice and 1d object works the same as when using two slices (lines 4, 6, 7).**
* **Python converts `'obj[i, j]'` to `'obj[(i, j)]'`. This makes `'<2d>[row_i, col_i]'` and `'<2d>[row_indices]'` indistinguishable to NumPy if tuple of two indices is passed!**
* **`'ix_([1, 2], [3, 4])'` returns `'[[1], [2]]'` and `'[[3, 4]]'`. Due to broadcasting rules, this is the same as using `'[[1, 1], [2, 2]]'` and `'[[3, 4], [3, 4]]'`.**
* **Any value that is broadcastable to the indexed shape can be assigned to the selection.**
<div><h4id="expressionsthatcallthereprmethod">Expressions that call the repr() method:</h4><pre><codeclass="python language-python hljs">print/str/repr([<obj>])
<div><h4id="expressionsthatcallthereprmethod">Expressions that call the repr() method:</h4><pre><codeclass="python language-python hljs">print/str/repr([<obj>, ...])
print/str/repr({<obj>: <obj>, ...})
Z = make_dataclass(<spanclass="hljs-string">'Z'</span>, [<spanclass="hljs-string">'a'</span>]); print/str/repr(Z(<obj>))
<li><strong><codeclass="python hljs"><spanclass="hljs-string">':'</span></code> returns a slice of all dimension's indices. Omitted dimensions default to <codeclass="python hljs"><spanclass="hljs-string">':'</span></code>.</strong></li>
<li><strong>Python converts <codeclass="python hljs"><spanclass="hljs-string">'obj[i, j]'</span></code> to <codeclass="python hljs"><spanclass="hljs-string">'obj[(i, j)]'</span></code>. This makes <codeclass="python hljs"><spanclass="hljs-string">'<2d>[row_i, col_i]'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'<2d>[row_indices]'</span></code> indistinguishable to NumPy if tuple of indices is passed!</strong></li>
<li><strong>Indexing with a slice and 1d object works the same as when using two slices (lines 4, 6, 7).</strong></li>
<li><strong>Python converts <codeclass="python hljs"><spanclass="hljs-string">'obj[i, j]'</span></code> to <codeclass="python hljs"><spanclass="hljs-string">'obj[(i, j)]'</span></code>. This makes <codeclass="python hljs"><spanclass="hljs-string">'<2d>[row_i, col_i]'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'<2d>[row_indices]'</span></code> indistinguishable to NumPy if tuple of two indices is passed!</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'ix_([1, 2], [3, 4])'</span></code> returns <codeclass="python hljs"><spanclass="hljs-string">'[[1], [2]]'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'[[3, 4]]'</span></code>. Due to broadcasting rules, this is the same as using <codeclass="python hljs"><spanclass="hljs-string">'[[1, 1], [2, 2]]'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'[[3, 4], [3, 4]]'</span></code>.</strong></li>
<li><strong>Any value that is broadcastable to the indexed shape can be assigned to the selection.</strong></li>
</ul>
@ -2944,7 +2942,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active
xxxxxxxxxx