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>Operations &#8212; MLX 0.0.5 documentation</title>
<title>Operations &#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>
@@ -641,24 +653,30 @@ document.write(`
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.ceil.html#mlx.core.ceil" title="mlx.core.ceil"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise ceil.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.concatenate.html#mlx.core.concatenate" title="mlx.core.concatenate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">concatenate</span></code></a>(arrays[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.clip.html#mlx.core.clip" title="mlx.core.clip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code></a>(a, /, a_min, a_max, *[, stream])</p></td>
<td><p>Clip the values of the array between the given minimum and maximum.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.concatenate.html#mlx.core.concatenate" title="mlx.core.concatenate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">concatenate</span></code></a>(arrays[, axis, stream])</p></td>
<td><p>Concatenate the arrays along the given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.convolve.html#mlx.core.convolve" title="mlx.core.convolve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">convolve</span></code></a>(a, v, /[, mode, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.convolve.html#mlx.core.convolve" title="mlx.core.convolve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">convolve</span></code></a>(a, v, /[, mode, stream])</p></td>
<td><p>The discrete convolution of 1D arrays.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.conv1d.html#mlx.core.conv1d" title="mlx.core.conv1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conv1d</span></code></a>(input, weight, /[, stride, padding, ...])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.conv1d.html#mlx.core.conv1d" title="mlx.core.conv1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conv1d</span></code></a>(input, weight, /[, stride, padding, ...])</p></td>
<td><p>1D convolution over an input with several channels</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.conv2d.html#mlx.core.conv2d" title="mlx.core.conv2d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conv2d</span></code></a>(input, weight, /[, stride, padding, ...])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.conv2d.html#mlx.core.conv2d" title="mlx.core.conv2d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conv2d</span></code></a>(input, weight, /[, stride, padding, ...])</p></td>
<td><p>2D convolution over an input with several channels</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.cos.html#mlx.core.cos" title="mlx.core.cos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cos</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.cos.html#mlx.core.cos" title="mlx.core.cos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cos</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise cosine.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.cosh.html#mlx.core.cosh" title="mlx.core.cosh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cosh</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.cosh.html#mlx.core.cosh" title="mlx.core.cosh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cosh</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise hyperbolic cosine.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.dequantize.html#mlx.core.dequantize" title="mlx.core.dequantize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dequantize</span></code></a>(w, /, scales, biases[, ...])</p></td>
<td><p>Dequantize the matrix <code class="docutils literal notranslate"><span class="pre">w</span></code> using the provided <code class="docutils literal notranslate"><span class="pre">scales</span></code> and <code class="docutils literal notranslate"><span class="pre">biases</span></code> and the <code class="docutils literal notranslate"><span class="pre">group_size</span></code> and <code class="docutils literal notranslate"><span class="pre">bits</span></code> configuration.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.divide.html#mlx.core.divide" title="mlx.core.divide"><code class="xref py py-obj docutils literal notranslate"><span class="pre">divide</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise division.</p></td>
</tr>
@@ -680,30 +698,36 @@ document.write(`
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.eye.html#mlx.core.eye" title="mlx.core.eye"><code class="xref py py-obj docutils literal notranslate"><span class="pre">eye</span></code></a>(n[, m, k, dtype, stream])</p></td>
<td><p>Create an identity matrix or a general diagonal matrix.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.floor.html#mlx.core.floor" title="mlx.core.floor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">floor</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise floor.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.flatten.html#mlx.core.flatten" title="mlx.core.flatten"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flatten</span></code></a>(a, /[, start_axis, end_axis, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.flatten.html#mlx.core.flatten" title="mlx.core.flatten"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flatten</span></code></a>(a, /[, start_axis, end_axis, stream])</p></td>
<td><p>Flatten an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.full.html#mlx.core.full" title="mlx.core.full"><code class="xref py py-obj docutils literal notranslate"><span class="pre">full</span></code></a>(shape, vals[, dtype, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.floor.html#mlx.core.floor" title="mlx.core.floor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">floor</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise floor.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.floor_divide.html#mlx.core.floor_divide" title="mlx.core.floor_divide"><code class="xref py py-obj docutils literal notranslate"><span class="pre">floor_divide</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise integer division.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.full.html#mlx.core.full" title="mlx.core.full"><code class="xref py py-obj docutils literal notranslate"><span class="pre">full</span></code></a>(shape, vals[, dtype, stream])</p></td>
<td><p>Construct an array with the given value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.greater.html#mlx.core.greater" title="mlx.core.greater"><code class="xref py py-obj docutils literal notranslate"><span class="pre">greater</span></code></a>(a, b[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.greater.html#mlx.core.greater" title="mlx.core.greater"><code class="xref py py-obj docutils literal notranslate"><span class="pre">greater</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise greater than.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.greater_equal.html#mlx.core.greater_equal" title="mlx.core.greater_equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">greater_equal</span></code></a>(a, b[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.greater_equal.html#mlx.core.greater_equal" title="mlx.core.greater_equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">greater_equal</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise greater or equal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.identity.html#mlx.core.identity" title="mlx.core.identity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">identity</span></code></a>(n[, dtype, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.identity.html#mlx.core.identity" title="mlx.core.identity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">identity</span></code></a>(n[, dtype, stream])</p></td>
<td><p>Create a square identity matrix.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.less.html#mlx.core.less" title="mlx.core.less"><code class="xref py py-obj docutils literal notranslate"><span class="pre">less</span></code></a>(a, b[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.less.html#mlx.core.less" title="mlx.core.less"><code class="xref py py-obj docutils literal notranslate"><span class="pre">less</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise less than.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.less_equal.html#mlx.core.less_equal" title="mlx.core.less_equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">less_equal</span></code></a>(a, b[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.less_equal.html#mlx.core.less_equal" title="mlx.core.less_equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">less_equal</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise less than or equal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.linspace.html#mlx.core.linspace" title="mlx.core.linspace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">linspace</span></code></a>(start, stop[, num, dtype, stream])</p></td>
<td><p>Generate <code class="docutils literal notranslate"><span class="pre">num</span></code> evenly spaced numbers over interval <code class="docutils literal notranslate"><span class="pre">[start,</span> <span class="pre">stop]</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.load.html#mlx.core.load" title="mlx.core.load"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load</span></code></a>(file, /, *[, stream])</p></td>
<td><p>Load array(s) from a binary file in <code class="docutils literal notranslate"><span class="pre">.npy</span></code> or <code class="docutils literal notranslate"><span class="pre">.npz</span></code> format.</p></td>
</tr>
@@ -770,103 +794,112 @@ document.write(`
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.prod.html#mlx.core.prod" title="mlx.core.prod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">prod</span></code></a>(a, /[, axis, keepdims, stream])</p></td>
<td><p>An product reduction over the given axes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.quantize.html#mlx.core.quantize" title="mlx.core.quantize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quantize</span></code></a>(w, /[, group_size, bits, stream])</p></td>
<td><p>Quantize the matrix <code class="docutils literal notranslate"><span class="pre">w</span></code> using <code class="docutils literal notranslate"><span class="pre">bits</span></code> bits per element.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.quantized_matmul.html#mlx.core.quantized_matmul" title="mlx.core.quantized_matmul"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quantized_matmul</span></code></a>(x, w, scales, biases, /[, ...])</p></td>
<td><p>Perform the matrix multiplication with the quantized matrix <code class="docutils literal notranslate"><span class="pre">w</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.reciprocal.html#mlx.core.reciprocal" title="mlx.core.reciprocal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reciprocal</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise reciprocal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.reshape.html#mlx.core.reshape" title="mlx.core.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reshape</span></code></a>(a, /, shape, *[, stream])</p></td>
<td><p>Reshape an array while preserving the size.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.rsqrt.html#mlx.core.rsqrt" title="mlx.core.rsqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rsqrt</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.round.html#mlx.core.round" title="mlx.core.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code></a>(a, /[, decimals, stream])</p></td>
<td><p>Round to the given number of decimals.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.rsqrt.html#mlx.core.rsqrt" title="mlx.core.rsqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rsqrt</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise reciprocal and square root.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.save.html#mlx.core.save" title="mlx.core.save"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save</span></code></a>(file, arr, /[, retain_graph])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.save.html#mlx.core.save" title="mlx.core.save"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save</span></code></a>(file, arr, /[, retain_graph])</p></td>
<td><p>Save the array to a binary file in <code class="docutils literal notranslate"><span class="pre">.npy</span></code> format.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.savez.html#mlx.core.savez" title="mlx.core.savez"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savez</span></code></a>(file, *args, **kwargs)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.savez.html#mlx.core.savez" title="mlx.core.savez"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savez</span></code></a>(file, *args, **kwargs)</p></td>
<td><p>Save several arrays to a binary file in uncompressed <code class="docutils literal notranslate"><span class="pre">.npz</span></code> format.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.savez_compressed.html#mlx.core.savez_compressed" title="mlx.core.savez_compressed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savez_compressed</span></code></a>(file, *args, **kwargs)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.savez_compressed.html#mlx.core.savez_compressed" title="mlx.core.savez_compressed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savez_compressed</span></code></a>(file, *args, **kwargs)</p></td>
<td><p>Save several arrays to a binary file in compressed <code class="docutils literal notranslate"><span class="pre">.npz</span></code> format.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sigmoid.html#mlx.core.sigmoid" title="mlx.core.sigmoid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sigmoid</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sigmoid.html#mlx.core.sigmoid" title="mlx.core.sigmoid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sigmoid</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise logistic sigmoid.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sign.html#mlx.core.sign" title="mlx.core.sign"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sign</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sign.html#mlx.core.sign" title="mlx.core.sign"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sign</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise sign.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sin.html#mlx.core.sin" title="mlx.core.sin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sin</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sin.html#mlx.core.sin" title="mlx.core.sin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sin</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise sine.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sinh.html#mlx.core.sinh" title="mlx.core.sinh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sinh</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sinh.html#mlx.core.sinh" title="mlx.core.sinh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sinh</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise hyperbolic sine.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.softmax.html#mlx.core.softmax" title="mlx.core.softmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">softmax</span></code></a>(a, /[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.softmax.html#mlx.core.softmax" title="mlx.core.softmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">softmax</span></code></a>(a, /[, axis, stream])</p></td>
<td><p>Perform the softmax along the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sort.html#mlx.core.sort" title="mlx.core.sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sort</span></code></a>(a, /[, axis, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sort.html#mlx.core.sort" title="mlx.core.sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sort</span></code></a>(a, /[, axis, stream])</p></td>
<td><p>Returns a sorted copy of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.split.html#mlx.core.split" title="mlx.core.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">split</span></code></a>(a, /, indices_or_sections[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.split.html#mlx.core.split" title="mlx.core.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">split</span></code></a>(a, /, indices_or_sections[, axis, stream])</p></td>
<td><p>Split an array along a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sqrt.html#mlx.core.sqrt" title="mlx.core.sqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqrt</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sqrt.html#mlx.core.sqrt" title="mlx.core.sqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqrt</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise square root.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.square.html#mlx.core.square" title="mlx.core.square"><code class="xref py py-obj docutils literal notranslate"><span class="pre">square</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.square.html#mlx.core.square" title="mlx.core.square"><code class="xref py py-obj docutils literal notranslate"><span class="pre">square</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise square.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.squeeze.html#mlx.core.squeeze" title="mlx.core.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">squeeze</span></code></a>(a, /[, axis, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.squeeze.html#mlx.core.squeeze" title="mlx.core.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">squeeze</span></code></a>(a, /[, axis, stream])</p></td>
<td><p>Remove length one axes from an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.stack.html#mlx.core.stack" title="mlx.core.stack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stack</span></code></a>(arrays[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.stack.html#mlx.core.stack" title="mlx.core.stack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stack</span></code></a>(arrays[, axis, stream])</p></td>
<td><p>Stacks the arrays along a new axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.stop_gradient.html#mlx.core.stop_gradient" title="mlx.core.stop_gradient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stop_gradient</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.stop_gradient.html#mlx.core.stop_gradient" title="mlx.core.stop_gradient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stop_gradient</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Stop gradients from being computed.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.subtract.html#mlx.core.subtract" title="mlx.core.subtract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subtract</span></code></a>(a, b[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.subtract.html#mlx.core.subtract" title="mlx.core.subtract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subtract</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise subtraction.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.sum.html#mlx.core.sum" title="mlx.core.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sum</span></code></a>(a, /[, axis, keepdims, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.sum.html#mlx.core.sum" title="mlx.core.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sum</span></code></a>(a, /[, axis, keepdims, stream])</p></td>
<td><p>Sum reduce the array over the given axes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.swapaxes.html#mlx.core.swapaxes" title="mlx.core.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">swapaxes</span></code></a>(a, /, axis1, axis2, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.swapaxes.html#mlx.core.swapaxes" title="mlx.core.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">swapaxes</span></code></a>(a, /, axis1, axis2, *[, stream])</p></td>
<td><p>Swap two axes of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.take.html#mlx.core.take" title="mlx.core.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take</span></code></a>(a, /, indices[, axis, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.take.html#mlx.core.take" title="mlx.core.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take</span></code></a>(a, /, indices[, axis, stream])</p></td>
<td><p>Take elements along an axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.take_along_axis.html#mlx.core.take_along_axis" title="mlx.core.take_along_axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take_along_axis</span></code></a>(a, /, indices[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.take_along_axis.html#mlx.core.take_along_axis" title="mlx.core.take_along_axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take_along_axis</span></code></a>(a, /, indices[, axis, stream])</p></td>
<td><p>Take values along an axis at the specified indices.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.tan.html#mlx.core.tan" title="mlx.core.tan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tan</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.tan.html#mlx.core.tan" title="mlx.core.tan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tan</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise tangent.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.tanh.html#mlx.core.tanh" title="mlx.core.tanh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tanh</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.tanh.html#mlx.core.tanh" title="mlx.core.tanh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tanh</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise hyperbolic tangent.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.transpose.html#mlx.core.transpose" title="mlx.core.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transpose</span></code></a>(a, /[, axes, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.transpose.html#mlx.core.transpose" title="mlx.core.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transpose</span></code></a>(a, /[, axes, stream])</p></td>
<td><p>Transpose the dimensions of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.tri.html#mlx.core.tri" title="mlx.core.tri"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tri</span></code></a>(n, m, k[, dtype, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.tri.html#mlx.core.tri" title="mlx.core.tri"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tri</span></code></a>(n, m, k[, dtype, stream])</p></td>
<td><p>An array with ones at and below the given diagonal and zeros elsewhere.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.tril.html#mlx.core.tril" title="mlx.core.tril"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tril</span></code></a>(x, k, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.tril.html#mlx.core.tril" title="mlx.core.tril"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tril</span></code></a>(x, k, *[, stream])</p></td>
<td><p>Zeros the array above the given diagonal.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.triu.html#mlx.core.triu" title="mlx.core.triu"><code class="xref py py-obj docutils literal notranslate"><span class="pre">triu</span></code></a>(x, k, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.triu.html#mlx.core.triu" title="mlx.core.triu"><code class="xref py py-obj docutils literal notranslate"><span class="pre">triu</span></code></a>(x, k, *[, stream])</p></td>
<td><p>Zeros the array below the given diagonal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.var.html#mlx.core.var" title="mlx.core.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">var</span></code></a>(a, /[, axis, keepdims, ddof, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.var.html#mlx.core.var" title="mlx.core.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">var</span></code></a>(a, /[, axis, keepdims, ddof, stream])</p></td>
<td><p>Compute the variance(s) over the given axes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.where.html#mlx.core.where" title="mlx.core.where"><code class="xref py py-obj docutils literal notranslate"><span class="pre">where</span></code></a>(condition, x, y, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.where.html#mlx.core.where" title="mlx.core.where"><code class="xref py py-obj docutils literal notranslate"><span class="pre">where</span></code></a>(condition, x, y, /, *[, stream])</p></td>
<td><p>Select from <code class="docutils literal notranslate"><span class="pre">x</span></code> or <code class="docutils literal notranslate"><span class="pre">y</span></code> according to <code class="docutils literal notranslate"><span class="pre">condition</span></code>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.zeros.html#mlx.core.zeros" title="mlx.core.zeros"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zeros</span></code></a>(shape[, dtype, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.zeros.html#mlx.core.zeros" title="mlx.core.zeros"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zeros</span></code></a>(shape[, dtype, stream])</p></td>
<td><p>Construct an array of zeros.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.zeros_like.html#mlx.core.zeros_like" title="mlx.core.zeros_like"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zeros_like</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.zeros_like.html#mlx.core.zeros_like" title="mlx.core.zeros_like"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zeros_like</span></code></a>(a, /, *[, stream])</p></td>
<td><p>An array of zeros like the input.</p></td>
</tr>
</tbody>