This commit is contained in:
Awni Hannun
2023-12-21 22:13:41 -08:00
committed by CircleCI Docs
parent 9d7133097f
commit de4f3e72fd
273 changed files with 13936 additions and 1646 deletions

View File

@@ -9,7 +9,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Array &#8212; MLX 0.0.5 documentation</title>
<title>Array &#8212; MLX 0.0.6 documentation</title>
@@ -134,8 +134,8 @@
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.0.5 documentation - Home"/>
<script>document.write(`<img src="../_static/mlx_logo.png" class="logo__image only-dark" alt="MLX 0.0.5 documentation - Home"/>`);</script>
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.0.6 documentation - Home"/>
<script>document.write(`<img src="../_static/mlx_logo.png" class="logo__image only-dark" alt="MLX 0.0.6 documentation - Home"/>`);</script>
</a></div>
@@ -186,6 +186,7 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.prod.html">mlx.core.array.prod</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.reciprocal.html">mlx.core.array.reciprocal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.reshape.html">mlx.core.array.reshape</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.round.html">mlx.core.array.round</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.rsqrt.html">mlx.core.array.rsqrt</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.sin.html">mlx.core.array.sin</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array.split.html">mlx.core.array.split</a></li>
@@ -227,12 +228,14 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.array_equal.html">mlx.core.array_equal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.broadcast_to.html">mlx.core.broadcast_to</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.ceil.html">mlx.core.ceil</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.clip.html">mlx.core.clip</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.concatenate.html">mlx.core.concatenate</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.convolve.html">mlx.core.convolve</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.conv1d.html">mlx.core.conv1d</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.conv2d.html">mlx.core.conv2d</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.cos.html">mlx.core.cos</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.cosh.html">mlx.core.cosh</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.dequantize.html">mlx.core.dequantize</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.divide.html">mlx.core.divide</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.equal.html">mlx.core.equal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.erf.html">mlx.core.erf</a></li>
@@ -240,14 +243,16 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.exp.html">mlx.core.exp</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.expand_dims.html">mlx.core.expand_dims</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.eye.html">mlx.core.eye</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.floor.html">mlx.core.floor</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.flatten.html">mlx.core.flatten</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.floor.html">mlx.core.floor</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.floor_divide.html">mlx.core.floor_divide</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.full.html">mlx.core.full</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.greater.html">mlx.core.greater</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.greater_equal.html">mlx.core.greater_equal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.identity.html">mlx.core.identity</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.less.html">mlx.core.less</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.less_equal.html">mlx.core.less_equal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.linspace.html">mlx.core.linspace</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.load.html">mlx.core.load</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.log.html">mlx.core.log</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.log2.html">mlx.core.log2</a></li>
@@ -270,8 +275,11 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.partition.html">mlx.core.partition</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.pad.html">mlx.core.pad</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.prod.html">mlx.core.prod</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.quantize.html">mlx.core.quantize</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.quantized_matmul.html">mlx.core.quantized_matmul</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.reciprocal.html">mlx.core.reciprocal</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.reshape.html">mlx.core.reshape</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.round.html">mlx.core.round</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.rsqrt.html">mlx.core.rsqrt</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.save.html">mlx.core.save</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.savez.html">mlx.core.savez</a></li>
@@ -364,6 +372,7 @@
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary/mlx.nn.RoPE.html">mlx.nn.RoPE</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary/mlx.nn.MultiHeadAttention.html">mlx.nn.MultiHeadAttention</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary/mlx.nn.Sequential.html">mlx.nn.Sequential</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary/mlx.nn.QuantizedLinear.html">mlx.nn.QuantizedLinear</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="nn/functions.html">Functions</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-9"><i class="fa-solid fa-chevron-down"></i></label><ul>
@@ -379,12 +388,14 @@
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="nn/losses.html">Loss Functions</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-10"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html">mlx.nn.losses.cross_entropy</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.html">mlx.nn.losses.binary_cross_entropy</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html">mlx.nn.losses.cross_entropy</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html">mlx.nn.losses.kl_div_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.l1_loss.html">mlx.nn.losses.l1_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.mse_loss.html">mlx.nn.losses.mse_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.nll_loss.html">mlx.nn.losses.nll_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html">mlx.nn.losses.kl_div_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html">mlx.nn.losses.smooth_l1_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.triplet_loss.html">mlx.nn.losses.triplet_loss</a></li>
</ul>
</li>
</ul>
@@ -399,6 +410,7 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.optimizers.Adam.html">mlx.optimizers.Adam</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.optimizers.AdamW.html">mlx.optimizers.AdamW</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.optimizers.Adamax.html">mlx.optimizers.Adamax</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.optimizers.Lion.html">mlx.optimizers.Lion</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="tree_utils.html">Tree Utils</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-12"><i class="fa-solid fa-chevron-down"></i></label><ul>
@@ -662,31 +674,34 @@ document.write(`
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.reshape.html#mlx.core.array.reshape" title="mlx.core.array.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.reshape</span></code></a>(self, *args[, stream])</p></td>
<td><p>Equivalent to <a class="reference internal" href="_autosummary/mlx.core.reshape.html#mlx.core.reshape" title="mlx.core.reshape"><code class="xref py py-func docutils literal notranslate"><span class="pre">reshape()</span></code></a> but the shape can be passed either as a tuple or as separate arguments.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.rsqrt.html#mlx.core.array.rsqrt" title="mlx.core.array.rsqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.rsqrt</span></code></a>(self, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.round.html#mlx.core.array.round" title="mlx.core.array.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.round</span></code></a>(self, /[, decimals, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.round.html#mlx.core.round" title="mlx.core.round"><code class="xref py py-func docutils literal notranslate"><span class="pre">round()</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.rsqrt.html#mlx.core.array.rsqrt" title="mlx.core.array.rsqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.rsqrt</span></code></a>(self, *[, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.rsqrt.html#mlx.core.rsqrt" title="mlx.core.rsqrt"><code class="xref py py-func docutils literal notranslate"><span class="pre">rsqrt()</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sin.html#mlx.core.array.sin" title="mlx.core.array.sin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sin</span></code></a>(self, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sin.html#mlx.core.array.sin" title="mlx.core.array.sin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sin</span></code></a>(self, *[, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.sin.html#mlx.core.sin" title="mlx.core.sin"><code class="xref py py-func docutils literal notranslate"><span class="pre">sin()</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.split.html#mlx.core.array.split" title="mlx.core.array.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.split</span></code></a>(self, indices_or_sections[, ...])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.split.html#mlx.core.array.split" title="mlx.core.array.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.split</span></code></a>(self, indices_or_sections[, ...])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.split.html#mlx.core.split" title="mlx.core.split"><code class="xref py py-func docutils literal notranslate"><span class="pre">split()</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sqrt.html#mlx.core.array.sqrt" title="mlx.core.array.sqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sqrt</span></code></a>(self, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sqrt.html#mlx.core.array.sqrt" title="mlx.core.array.sqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sqrt</span></code></a>(self, *[, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.sqrt.html#mlx.core.sqrt" title="mlx.core.sqrt"><code class="xref py py-func docutils literal notranslate"><span class="pre">sqrt()</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.square.html#mlx.core.array.square" title="mlx.core.array.square"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.square</span></code></a>(self, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.square.html#mlx.core.array.square" title="mlx.core.array.square"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.square</span></code></a>(self, *[, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.square.html#mlx.core.square" title="mlx.core.square"><code class="xref py py-func docutils literal notranslate"><span class="pre">square()</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sum.html#mlx.core.array.sum" title="mlx.core.array.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sum</span></code></a>(self[, axis, keepdims, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.sum.html#mlx.core.array.sum" title="mlx.core.array.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.sum</span></code></a>(self[, axis, keepdims, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.sum.html#mlx.core.sum" title="mlx.core.sum"><code class="xref py py-func docutils literal notranslate"><span class="pre">sum()</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.transpose.html#mlx.core.array.transpose" title="mlx.core.array.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.transpose</span></code></a>(self, *args[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.transpose.html#mlx.core.array.transpose" title="mlx.core.array.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.transpose</span></code></a>(self, *args[, stream])</p></td>
<td><p>Equivalent to <a class="reference internal" href="_autosummary/mlx.core.transpose.html#mlx.core.transpose" title="mlx.core.transpose"><code class="xref py py-func docutils literal notranslate"><span class="pre">transpose()</span></code></a> but the axes can be passed either as a tuple or as separate arguments.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.T.html#mlx.core.array.T" title="mlx.core.array.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.T</span></code></a></p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.T.html#mlx.core.array.T" title="mlx.core.array.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.T</span></code></a></p></td>
<td><p>Equivalent to calling <code class="docutils literal notranslate"><span class="pre">self.transpose()</span></code> with no arguments.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.var.html#mlx.core.array.var" title="mlx.core.array.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.var</span></code></a>(self[, axis, keepdims, ddof, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.array.var.html#mlx.core.array.var" title="mlx.core.array.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array.var</span></code></a>(self[, axis, keepdims, ddof, stream])</p></td>
<td><p>See <a class="reference internal" href="_autosummary/mlx.core.var.html#mlx.core.var" title="mlx.core.var"><code class="xref py py-func docutils literal notranslate"><span class="pre">var()</span></code></a>.</p></td>
</tr>
</tbody>