Browse Source

NumPy

pull/170/head
Jure Šorn 1 year ago
parent
commit
abe2bbef70
2 changed files with 4 additions and 4 deletions
  1. 2
      README.md
  2. 6
      index.html

2
README.md

@ -2667,7 +2667,7 @@ import numpy as np
```python
<array> = np.concatenate(<list_of_arrays>, axis=0) # Links arrays along first axis (rows).
<array> = np.row_stack/column_stack(<list_of_arrays>) # Treats 1d arrays as rows or columns.
<array> = np.tile/repeat(<array>, <int/list>) # Tiles array or repeats its elements.
<array> = np.tile/repeat(<array>, <int/list> [, axis]) # Tiles array or repeats its elements.
```
* **Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).**
* **Axis is an index of the dimension that gets aggregated. Leftmost dimension has index 0. Summing the RGB image along axis 2 will return a greyscale image with shape (50, 100).**

6
index.html

@ -54,7 +54,7 @@
<body>
<header>
<aside>December 5, 2023</aside>
<aside>December 6, 2023</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -2176,7 +2176,7 @@ $ snakeviz test.prof
</code></pre>
<pre><code class="python language-python hljs">&lt;array&gt; = np.concatenate(&lt;list_of_arrays&gt;, axis=<span class="hljs-number">0</span>) <span class="hljs-comment"># Links arrays along first axis (rows).</span>
&lt;array&gt; = np.row_stack/column_stack(&lt;list_of_arrays&gt;) <span class="hljs-comment"># Treats 1d arrays as rows or columns.</span>
&lt;array&gt; = np.tile/repeat(&lt;array&gt;, &lt;int/list&gt;) <span class="hljs-comment"># Tiles array or repeats its elements.</span>
&lt;array&gt; = np.tile/repeat(&lt;array&gt;, &lt;int/list&gt; [, axis]) <span class="hljs-comment"># Tiles array or repeats its elements.</span>
</code></pre>
<ul>
<li><strong>Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).</strong></li>
@ -2926,7 +2926,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the activ
<footer>
<aside>December 5, 2023</aside>
<aside>December 6, 2023</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save