docs update

This commit is contained in:
Awni Hannun
2024-07-25 11:59:11 -07:00
committed by CircleCI Docs
parent 9f4b63abe7
commit ee4f4e3816
512 changed files with 11657 additions and 3434 deletions

View File

@@ -168,9 +168,9 @@ Functions</h2></td></tr>
<tr class="memitem:gaa6adbc9c86f0ab27d8810a02e9e719fd" id="r_gaa6adbc9c86f0ab27d8810a02e9e719fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa6adbc9c86f0ab27d8810a02e9e719fd">mlx::core::flatten</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:gaa6adbc9c86f0ab27d8810a02e9e719fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flatten the array to 1D. <br /></td></tr>
<tr class="separator:gaa6adbc9c86f0ab27d8810a02e9e719fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga001919c0ee4a9c3d7948ed32cb4c58d6" id="r_ga001919c0ee4a9c3d7948ed32cb4c58d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga001919c0ee4a9c3d7948ed32cb4c58d6">mlx::core::hadamard_transform</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, float scale=1.0f, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga001919c0ee4a9c3d7948ed32cb4c58d6"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_multiply.html">Multiply</a> the array by the <a class="el" href="classmlx_1_1core_1_1_hadamard.html">Hadamard</a> matrix of corresponding size. <br /></td></tr>
<tr class="separator:ga001919c0ee4a9c3d7948ed32cb4c58d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga872d2c1806e67ce2596b24d056681074" id="r_ga872d2c1806e67ce2596b24d056681074"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga872d2c1806e67ce2596b24d056681074">mlx::core::hadamard_transform</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, std::optional&lt; float &gt; scale=std::nullopt, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga872d2c1806e67ce2596b24d056681074"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_multiply.html">Multiply</a> the array by the <a class="el" href="classmlx_1_1core_1_1_hadamard.html">Hadamard</a> matrix of corresponding size. <br /></td></tr>
<tr class="separator:ga872d2c1806e67ce2596b24d056681074"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga710daa7ec721bd4d3f326082cb195576" id="r_ga710daa7ec721bd4d3f326082cb195576"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga710daa7ec721bd4d3f326082cb195576">mlx::core::squeeze</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; int &gt; &amp;axes, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga710daa7ec721bd4d3f326082cb195576"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove singleton dimensions at the given axes. <br /></td></tr>
<tr class="separator:ga710daa7ec721bd4d3f326082cb195576"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -342,6 +342,9 @@ Functions</h2></td></tr>
<tr class="memitem:ga8a2056f8c9bb30914c40bcf509386491" id="r_ga8a2056f8c9bb30914c40bcf509386491"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8a2056f8c9bb30914c40bcf509386491">mlx::core::where</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;condition, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;x, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;y, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga8a2056f8c9bb30914c40bcf509386491"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_select.html">Select</a> from x or y depending on condition. <br /></td></tr>
<tr class="separator:ga8a2056f8c9bb30914c40bcf509386491"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga506d1b63e391e45a7d8dc10cfd71e78d" id="r_ga506d1b63e391e45a7d8dc10cfd71e78d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga506d1b63e391e45a7d8dc10cfd71e78d">mlx::core::nan_to_num</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, float nan=0.0f, const std::optional&lt; float &gt; &amp;posinf=std::nullopt, const std::optional&lt; float &gt; &amp;neginf=std::nullopt, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga506d1b63e391e45a7d8dc10cfd71e78d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace NaN and infinities with finite numbers. <br /></td></tr>
<tr class="separator:ga506d1b63e391e45a7d8dc10cfd71e78d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b1b90ef1275ca17655b6d7f25d3ee68" id="r_ga3b1b90ef1275ca17655b6d7f25d3ee68"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3b1b90ef1275ca17655b6d7f25d3ee68">mlx::core::all</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, bool keepdims, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga3b1b90ef1275ca17655b6d7f25d3ee68"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if all elements in the array are true (or non-zero). <br /></td></tr>
<tr class="separator:ga3b1b90ef1275ca17655b6d7f25d3ee68"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -4060,8 +4063,8 @@ template&lt;typename T &gt; </div>
</div>
</div>
<a id="ga001919c0ee4a9c3d7948ed32cb4c58d6" name="ga001919c0ee4a9c3d7948ed32cb4c58d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga001919c0ee4a9c3d7948ed32cb4c58d6">&#9670;&#160;</a></span>hadamard_transform()</h2>
<a id="ga872d2c1806e67ce2596b24d056681074" name="ga872d2c1806e67ce2596b24d056681074"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga872d2c1806e67ce2596b24d056681074">&#9670;&#160;</a></span>hadamard_transform()</h2>
<div class="memitem">
<div class="memproto">
@@ -4074,7 +4077,7 @@ template&lt;typename T &gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>scale</em><span class="paramdefsep"> = </span><span class="paramdefval">1.0f</span>, </span></td>
<td class="paramtype">std::optional&lt; float &gt;</td> <td class="paramname"><span class="paramname"><em>scale</em><span class="paramdefsep"> = </span><span class="paramdefval">std::nullopt</span>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -5289,6 +5292,44 @@ template&lt;typename T &gt; </div>
<p><a class="el" href="classmlx_1_1core_1_1_multiply.html">Multiply</a> two arrays. </p>
</div>
</div>
<a id="ga506d1b63e391e45a7d8dc10cfd71e78d" name="ga506d1b63e391e45a7d8dc10cfd71e78d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga506d1b63e391e45a7d8dc10cfd71e78d">&#9670;&#160;</a></span>nan_to_num()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> mlx::core::nan_to_num </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;</td> <td class="paramname"><span class="paramname"><em>a</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>nan</em><span class="paramdefsep"> = </span><span class="paramdefval">0.0f</span>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::optional&lt; float &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>posinf</em><span class="paramdefsep"> = </span><span class="paramdefval">std::nullopt</span>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::optional&lt; float &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>neginf</em><span class="paramdefsep"> = </span><span class="paramdefval">std::nullopt</span>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a></td> <td class="paramname"><span class="paramname"><em>s</em><span class="paramdefsep"> = </span><span class="paramdefval">{}</span></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Replace NaN and infinities with finite numbers. </p>
</div>
</div>
<a id="ga95d9a9425533b5ed1707eb00184dffc6" name="ga95d9a9425533b5ed1707eb00184dffc6"></a>