<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 `':'`.**
* **Sixth line fails if tuple is used because Python converts `'obj[i, j]'` to `'obj[(i, j)]'`!**
* **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 array works the same as when using two slices (lines 4, 6, 7).**
* **`'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.**
<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>Sixth line fails if tuple is used because 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>!</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 array works the same as when using two slices (lines 4, 6, 7).</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>
@ -2228,24 +2228,21 @@ right = [[<span class="hljs-number">0.1</span>], [<span class="hljs-number">0.6<
<div><h4id="2ifanydimensionsdifferinsizeexpandtheonesthathavesize1byduplicatingtheirelements">2. If any dimensions differ in size, expand the ones that have size 1 by duplicating their elements:</h4><pre><codeclass="python language-python hljs">left = [[<spanclass="hljs-number">0.1</span>, <spanclass="hljs-number">0.6</span>, <spanclass="hljs-number">0.8</span>], <spanclass="hljs-comment"># Shape: (3, 3) <- !</span>
<div><h3id="example-3">Example</h3><div><h4id="foreachpointreturnsindexofitsnearestpoint010608121">For each point returns index of its nearest point (<codeclass="python hljs">[<spanclass="hljs-number">0.1</span>, <spanclass="hljs-number">0.6</span>, <spanclass="hljs-number">0.8</span>] => [<spanclass="hljs-number">1</span>, <spanclass="hljs-number">2</span>, <spanclass="hljs-number">1</span>]</code>):</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-meta">>>></span>points = np.array([<spanclass="hljs-number">0.1</span>, <spanclass="hljs-number">0.6</span>, <spanclass="hljs-number">0.8</span>])