This commit is contained in:
Awni Hannun
2024-01-10 14:14:38 -08:00
committed by CircleCI Docs
parent 2aeb6df29c
commit 7534da7269
314 changed files with 11870 additions and 691 deletions

View File

@@ -148,9 +148,12 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Usage</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../usage/quick_start.html">Quick Start Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/lazy_evaluation.html">Lazy Evaluation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/unified_memory.html">Unified Memory</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/using_streams.html">Using Streams</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/indexing.html">Indexing Arrays</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/saving_and_loading.html">Saving and Loading Arrays</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/numpy.html">Conversion to NumPy and Other Frameworks</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage/using_streams.html">Using Streams</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Examples</span></p>
<ul class="nav bd-sidenav">
@@ -238,6 +241,7 @@
<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.divmod.html">mlx.core.divmod</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>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.erfinv.html">mlx.core.erfinv</a></li>
@@ -251,6 +255,7 @@
<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.inner.html">mlx.core.inner</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>
@@ -261,6 +266,8 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.log1p.html">mlx.core.log1p</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.logaddexp.html">mlx.core.logaddexp</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.logical_not.html">mlx.core.logical_not</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.logical_and.html">mlx.core.logical_and</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.logical_or.html">mlx.core.logical_or</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.logsumexp.html">mlx.core.logsumexp</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.matmul.html">mlx.core.matmul</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.max.html">mlx.core.max</a></li>
@@ -273,6 +280,7 @@
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.negative.html">mlx.core.negative</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.ones.html">mlx.core.ones</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.ones_like.html">mlx.core.ones_like</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.outer.html">mlx.core.outer</a></li>
<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>
@@ -286,6 +294,7 @@
<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>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.savez_compressed.html">mlx.core.savez_compressed</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.save_gguf.html">mlx.core.save_gguf</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.save_safetensors.html">mlx.core.save_safetensors</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.sigmoid.html">mlx.core.sigmoid</a></li>
<li class="toctree-l2"><a class="reference internal" href="_autosummary/mlx.core.sign.html">mlx.core.sign</a></li>
@@ -435,6 +444,7 @@
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.hinge_loss.html">mlx.nn.losses.hinge_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.huber_loss.html">mlx.nn.losses.huber_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.html">mlx.nn.losses.log_cosh_loss</a></li>
<li class="toctree-l3"><a class="reference internal" href="nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss.html">mlx.nn.losses.cosine_similarity_loss</a></li>
</ul>
</li>
</ul>
@@ -719,45 +729,51 @@ document.write(`
<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>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.equal.html#mlx.core.equal" title="mlx.core.equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">equal</span></code></a>(a, b[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.divmod.html#mlx.core.divmod" title="mlx.core.divmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">divmod</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise quotient and remainder.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.equal.html#mlx.core.equal" title="mlx.core.equal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">equal</span></code></a>(a, b[, stream])</p></td>
<td><p>Element-wise equality.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.erf.html#mlx.core.erf" title="mlx.core.erf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">erf</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.erf.html#mlx.core.erf" title="mlx.core.erf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">erf</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise error function.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.erfinv.html#mlx.core.erfinv" title="mlx.core.erfinv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">erfinv</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.erfinv.html#mlx.core.erfinv" title="mlx.core.erfinv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">erfinv</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise inverse of <a class="reference internal" href="_autosummary/mlx.core.erf.html#mlx.core.erf" title="mlx.core.erf"><code class="xref py py-func docutils literal notranslate"><span class="pre">erf()</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.exp.html#mlx.core.exp" title="mlx.core.exp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">exp</span></code></a>(a, /, *[, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.exp.html#mlx.core.exp" title="mlx.core.exp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">exp</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise exponential.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.expand_dims.html#mlx.core.expand_dims" title="mlx.core.expand_dims"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expand_dims</span></code></a>(a, /, axis, *[, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.expand_dims.html#mlx.core.expand_dims" title="mlx.core.expand_dims"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expand_dims</span></code></a>(a, /, axis, *[, stream])</p></td>
<td><p>Add a size one dimension at the given axis.</p></td>
</tr>
<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>
<tr class="row-odd"><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.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-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>
<td><p>Flatten an array.</p></td>
</tr>
<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>
<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-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>
<tr class="row-even"><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>
<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>
<td><p>Construct an array with the given value.</p></td>
</tr>
<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>
<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>
<td><p>Element-wise greater than.</p></td>
</tr>
<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>
<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>
<td><p>Element-wise greater or equal.</p></td>
</tr>
<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>
<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>
<td><p>Create a square identity matrix.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.inner.html#mlx.core.inner" title="mlx.core.inner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">inner</span></code></a>(a, b, /, *[, stream])</p></td>
<td><p>Ordinary inner product of vectors for 1-D arrays, in higher dimensions a sum product over the last axes.</p></td>
</tr>
<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>
@@ -768,7 +784,7 @@ document.write(`
<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, /[, format, stream])</p></td>
<td><p>Load array(s) from a binary file in <code class="docutils literal notranslate"><span class="pre">.npy</span></code>, <code class="docutils literal notranslate"><span class="pre">.npz</span></code>, or <code class="docutils literal notranslate"><span class="pre">.safetensors</span></code> format.</p></td>
<td><p>Load array(s) from a binary file.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.log.html#mlx.core.log" title="mlx.core.log"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise natural logarithm.</p></td>
@@ -788,6 +804,12 @@ document.write(`
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.logical_not.html#mlx.core.logical_not" title="mlx.core.logical_not"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logical_not</span></code></a>(a, /, *[, stream])</p></td>
<td><p>Element-wise logical not.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.logical_and.html#mlx.core.logical_and" title="mlx.core.logical_and"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logical_and</span></code></a>(a, b, /, *[, stream])</p></td>
<td><p>Element-wise logical and.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.logical_or.html#mlx.core.logical_or" title="mlx.core.logical_or"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logical_or</span></code></a>(a, b, /, *[, stream])</p></td>
<td><p>Element-wise logical or.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.logsumexp.html#mlx.core.logsumexp" title="mlx.core.logsumexp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logsumexp</span></code></a>(a, /[, axis, keepdims, stream])</p></td>
<td><p>A <cite>log-sum-exp</cite> reduction over the given axes.</p></td>
</tr>
@@ -824,46 +846,52 @@ document.write(`
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.ones_like.html#mlx.core.ones_like" title="mlx.core.ones_like"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ones_like</span></code></a>(a, /, *[, stream])</p></td>
<td><p>An array of ones like the input.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.partition.html#mlx.core.partition" title="mlx.core.partition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">partition</span></code></a>(a, /, kth[, axis, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.outer.html#mlx.core.outer" title="mlx.core.outer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer</span></code></a>(a, b, /, *[, stream])</p></td>
<td><p>Compute the outer product of two 1-D arrays, if the array's passed are not 1-D a flatten op will be run beforehand.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.partition.html#mlx.core.partition" title="mlx.core.partition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">partition</span></code></a>(a, /, kth[, axis, stream])</p></td>
<td><p>Returns a partitioned copy of the array such that the smaller <code class="docutils literal notranslate"><span class="pre">kth</span></code> elements are first.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.pad.html#mlx.core.pad" title="mlx.core.pad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pad</span></code></a>(a, pad_with[, constant_values, stream])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.pad.html#mlx.core.pad" title="mlx.core.pad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pad</span></code></a>(a, pad_with[, constant_values, stream])</p></td>
<td><p>Pad an array with a constant value</p></td>
</tr>
<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>
<tr class="row-odd"><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>
<tr class="row-even"><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>
<tr class="row-odd"><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>
<tr class="row-even"><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.repeat.html#mlx.core.repeat" title="mlx.core.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">repeat</span></code></a>(array, repeats[, axis, stream])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.repeat.html#mlx.core.repeat" title="mlx.core.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">repeat</span></code></a>(array, repeats[, axis, stream])</p></td>
<td><p>Repeat an array along a specified axis.</p></td>
</tr>
<tr class="row-odd"><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>
<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-even"><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>
<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-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-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)</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.save_safetensors.html#mlx.core.save_safetensors" title="mlx.core.save_safetensors"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_safetensors</span></code></a>(file, arrays, /[, retain_graph])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="_autosummary/mlx.core.save_gguf.html#mlx.core.save_gguf" title="mlx.core.save_gguf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_gguf</span></code></a>(file, arrays)</p></td>
<td><p>Save array(s) to a binary file in <code class="docutils literal notranslate"><span class="pre">.gguf</span></code> format.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="_autosummary/mlx.core.save_safetensors.html#mlx.core.save_safetensors" title="mlx.core.save_safetensors"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_safetensors</span></code></a>(file, arrays)</p></td>
<td><p>Save array(s) to a binary file in <code class="docutils literal notranslate"><span class="pre">.safetensors</span></code> format.</p></td>
</tr>
<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>