From 7570a4bf27b790b82c70a815bdc54a6987c9c306 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Mon, 14 Oct 2024 13:10:48 -0700 Subject: [PATCH] rebase --- docs/build/html/.buildinfo | 2 +- .../mlx.core.random.permutation.rst | 6 + .../python/_autosummary/mlx.core.roll.rst | 6 + docs/build/html/_sources/python/ops.rst | 1 + docs/build/html/_sources/python/random.rst | 1 + .../html/_static/documentation_options.js | 2 +- docs/build/html/cpp/ops.html | 53 +- docs/build/html/dev/custom_metal_kernels.html | 10 +- docs/build/html/dev/extensions.html | 10 +- docs/build/html/dev/metal_debugger.html | 10 +- .../html/examples/linear_regression.html | 10 +- docs/build/html/examples/llama-inference.html | 10 +- docs/build/html/examples/mlp.html | 10 +- docs/build/html/genindex.html | 24 +- docs/build/html/index.html | 10 +- docs/build/html/install.html | 10 +- docs/build/html/objects.inv | Bin 26167 -> 26454 bytes .../python/_autosummary/mlx.core.Device.html | 12 +- .../python/_autosummary/mlx.core.Dtype.html | 10 +- .../_autosummary/mlx.core.DtypeCategory.html | 10 +- .../python/_autosummary/mlx.core.abs.html | 12 +- .../python/_autosummary/mlx.core.add.html | 12 +- .../python/_autosummary/mlx.core.addmm.html | 16 +- .../python/_autosummary/mlx.core.all.html | 16 +- .../_autosummary/mlx.core.allclose.html | 18 +- .../python/_autosummary/mlx.core.any.html | 16 +- .../python/_autosummary/mlx.core.arange.html | 54 +- .../python/_autosummary/mlx.core.arccos.html | 12 +- .../python/_autosummary/mlx.core.arccosh.html | 12 +- .../python/_autosummary/mlx.core.arcsin.html | 12 +- .../python/_autosummary/mlx.core.arcsinh.html | 12 +- .../python/_autosummary/mlx.core.arctan.html | 12 +- .../python/_autosummary/mlx.core.arctan2.html | 12 +- .../python/_autosummary/mlx.core.arctanh.html | 12 +- .../python/_autosummary/mlx.core.argmax.html | 16 +- .../python/_autosummary/mlx.core.argmin.html | 16 +- .../_autosummary/mlx.core.argpartition.html | 16 +- .../python/_autosummary/mlx.core.argsort.html | 14 +- .../python/_autosummary/mlx.core.array.T.html | 10 +- .../_autosummary/mlx.core.array.abs.html | 12 +- .../_autosummary/mlx.core.array.all.html | 12 +- .../_autosummary/mlx.core.array.any.html | 12 +- .../_autosummary/mlx.core.array.argmax.html | 12 +- .../_autosummary/mlx.core.array.argmin.html | 12 +- .../_autosummary/mlx.core.array.astype.html | 12 +- .../_autosummary/mlx.core.array.at.html | 10 +- .../_autosummary/mlx.core.array.conj.html | 12 +- .../_autosummary/mlx.core.array.cos.html | 12 +- .../_autosummary/mlx.core.array.cummax.html | 12 +- .../_autosummary/mlx.core.array.cummin.html | 12 +- .../_autosummary/mlx.core.array.cumprod.html | 12 +- .../_autosummary/mlx.core.array.cumsum.html | 12 +- .../_autosummary/mlx.core.array.diag.html | 12 +- .../_autosummary/mlx.core.array.diagonal.html | 12 +- .../_autosummary/mlx.core.array.dtype.html | 10 +- .../_autosummary/mlx.core.array.exp.html | 12 +- .../_autosummary/mlx.core.array.flatten.html | 12 +- .../python/_autosummary/mlx.core.array.html | 16 +- .../_autosummary/mlx.core.array.item.html | 12 +- .../_autosummary/mlx.core.array.itemsize.html | 10 +- .../_autosummary/mlx.core.array.log.html | 12 +- .../_autosummary/mlx.core.array.log10.html | 12 +- .../_autosummary/mlx.core.array.log1p.html | 12 +- .../_autosummary/mlx.core.array.log2.html | 12 +- .../mlx.core.array.logsumexp.html | 12 +- .../_autosummary/mlx.core.array.max.html | 12 +- .../_autosummary/mlx.core.array.mean.html | 12 +- .../_autosummary/mlx.core.array.min.html | 12 +- .../_autosummary/mlx.core.array.moveaxis.html | 12 +- .../_autosummary/mlx.core.array.nbytes.html | 10 +- .../_autosummary/mlx.core.array.ndim.html | 10 +- .../_autosummary/mlx.core.array.prod.html | 12 +- .../mlx.core.array.reciprocal.html | 12 +- .../_autosummary/mlx.core.array.reshape.html | 14 +- .../_autosummary/mlx.core.array.round.html | 12 +- .../_autosummary/mlx.core.array.rsqrt.html | 12 +- .../_autosummary/mlx.core.array.shape.html | 12 +- .../_autosummary/mlx.core.array.sin.html | 12 +- .../_autosummary/mlx.core.array.size.html | 10 +- .../_autosummary/mlx.core.array.split.html | 12 +- .../_autosummary/mlx.core.array.sqrt.html | 12 +- .../_autosummary/mlx.core.array.square.html | 12 +- .../_autosummary/mlx.core.array.squeeze.html | 12 +- .../_autosummary/mlx.core.array.std.html | 12 +- .../_autosummary/mlx.core.array.sum.html | 12 +- .../_autosummary/mlx.core.array.swapaxes.html | 12 +- .../_autosummary/mlx.core.array.tolist.html | 16 +- .../mlx.core.array.transpose.html | 12 +- .../_autosummary/mlx.core.array.var.html | 12 +- .../_autosummary/mlx.core.array.view.html | 12 +- .../_autosummary/mlx.core.array_equal.html | 14 +- .../_autosummary/mlx.core.as_strided.html | 18 +- .../_autosummary/mlx.core.atleast_1d.html | 14 +- .../_autosummary/mlx.core.atleast_2d.html | 14 +- .../_autosummary/mlx.core.atleast_3d.html | 14 +- .../_autosummary/mlx.core.bitwise_and.html | 12 +- .../_autosummary/mlx.core.bitwise_or.html | 12 +- .../_autosummary/mlx.core.bitwise_xor.html | 12 +- .../mlx.core.block_masked_mm.html | 14 +- .../_autosummary/mlx.core.broadcast_to.html | 14 +- .../python/_autosummary/mlx.core.ceil.html | 12 +- .../python/_autosummary/mlx.core.clip.html | 12 +- .../python/_autosummary/mlx.core.compile.html | 22 +- .../_autosummary/mlx.core.concatenate.html | 16 +- .../python/_autosummary/mlx.core.conj.html | 12 +- .../_autosummary/mlx.core.conjugate.html | 12 +- .../python/_autosummary/mlx.core.conv1d.html | 20 +- .../python/_autosummary/mlx.core.conv2d.html | 20 +- .../python/_autosummary/mlx.core.conv3d.html | 20 +- .../_autosummary/mlx.core.conv_general.html | 24 +- .../mlx.core.conv_transpose1d.html | 20 +- .../mlx.core.conv_transpose2d.html | 20 +- .../mlx.core.conv_transpose3d.html | 20 +- .../_autosummary/mlx.core.convolve.html | 14 +- .../python/_autosummary/mlx.core.cos.html | 12 +- .../python/_autosummary/mlx.core.cosh.html | 12 +- .../python/_autosummary/mlx.core.cummax.html | 18 +- .../python/_autosummary/mlx.core.cummin.html | 18 +- .../python/_autosummary/mlx.core.cumprod.html | 18 +- .../python/_autosummary/mlx.core.cumsum.html | 18 +- .../mlx.core.custom_function.html | 10 +- .../_autosummary/mlx.core.default_device.html | 10 +- .../_autosummary/mlx.core.default_stream.html | 10 +- .../python/_autosummary/mlx.core.degrees.html | 12 +- .../_autosummary/mlx.core.dequantize.html | 16 +- .../python/_autosummary/mlx.core.diag.html | 14 +- .../_autosummary/mlx.core.diagonal.html | 18 +- .../mlx.core.disable_compile.html | 12 +- .../mlx.core.distributed.Group.html | 10 +- .../mlx.core.distributed.all_gather.html | 12 +- .../mlx.core.distributed.all_sum.html | 12 +- .../mlx.core.distributed.init.html | 14 +- .../mlx.core.distributed.is_available.html | 12 +- .../mlx.core.distributed.recv.html | 16 +- .../mlx.core.distributed.recv_like.html | 14 +- .../mlx.core.distributed.send.html | 14 +- .../python/_autosummary/mlx.core.divide.html | 12 +- .../python/_autosummary/mlx.core.divmod.html | 14 +- .../python/_autosummary/mlx.core.einsum.html | 14 +- .../_autosummary/mlx.core.einsum_path.html | 16 +- .../_autosummary/mlx.core.enable_compile.html | 12 +- .../python/_autosummary/mlx.core.equal.html | 12 +- .../python/_autosummary/mlx.core.erf.html | 12 +- .../python/_autosummary/mlx.core.erfinv.html | 12 +- .../python/_autosummary/mlx.core.eval.html | 14 +- .../python/_autosummary/mlx.core.exp.html | 12 +- .../_autosummary/mlx.core.expand_dims.html | 14 +- .../python/_autosummary/mlx.core.expm1.html | 12 +- .../python/_autosummary/mlx.core.eye.html | 18 +- .../mlx.core.fast.affine_quantize.html | 16 +- .../mlx.core.fast.layer_norm.html | 14 +- .../mlx.core.fast.metal_kernel.html | 26 +- .../_autosummary/mlx.core.fast.rms_norm.html | 14 +- .../_autosummary/mlx.core.fast.rope.html | 22 +- ...ore.fast.scaled_dot_product_attention.html | 14 +- .../python/_autosummary/mlx.core.fft.fft.html | 16 +- .../_autosummary/mlx.core.fft.fft2.html | 16 +- .../_autosummary/mlx.core.fft.fftn.html | 16 +- .../_autosummary/mlx.core.fft.ifft.html | 16 +- .../_autosummary/mlx.core.fft.ifft2.html | 16 +- .../_autosummary/mlx.core.fft.ifftn.html | 16 +- .../_autosummary/mlx.core.fft.irfft.html | 16 +- .../_autosummary/mlx.core.fft.irfft2.html | 16 +- .../_autosummary/mlx.core.fft.irfftn.html | 16 +- .../_autosummary/mlx.core.fft.rfft.html | 16 +- .../_autosummary/mlx.core.fft.rfft2.html | 16 +- .../_autosummary/mlx.core.fft.rfftn.html | 16 +- .../python/_autosummary/mlx.core.flatten.html | 16 +- .../python/_autosummary/mlx.core.floor.html | 12 +- .../_autosummary/mlx.core.floor_divide.html | 12 +- .../python/_autosummary/mlx.core.full.html | 16 +- .../_autosummary/mlx.core.gather_mm.html | 12 +- .../_autosummary/mlx.core.gather_qmm.html | 18 +- .../python/_autosummary/mlx.core.grad.html | 16 +- .../python/_autosummary/mlx.core.greater.html | 12 +- .../_autosummary/mlx.core.greater_equal.html | 12 +- .../mlx.core.hadamard_transform.html | 14 +- .../_autosummary/mlx.core.identity.html | 14 +- .../python/_autosummary/mlx.core.inner.html | 12 +- .../python/_autosummary/mlx.core.isclose.html | 18 +- .../_autosummary/mlx.core.isfinite.html | 12 +- .../python/_autosummary/mlx.core.isinf.html | 12 +- .../python/_autosummary/mlx.core.isnan.html | 12 +- .../_autosummary/mlx.core.isneginf.html | 12 +- .../_autosummary/mlx.core.isposinf.html | 12 +- .../_autosummary/mlx.core.issubdtype.html | 14 +- .../python/_autosummary/mlx.core.jvp.html | 18 +- .../_autosummary/mlx.core.left_shift.html | 12 +- .../python/_autosummary/mlx.core.less.html | 12 +- .../_autosummary/mlx.core.less_equal.html | 12 +- .../mlx.core.linalg.cholesky.html | 14 +- .../mlx.core.linalg.cholesky_inv.html | 14 +- .../_autosummary/mlx.core.linalg.cross.html | 14 +- .../_autosummary/mlx.core.linalg.inv.html | 12 +- .../_autosummary/mlx.core.linalg.norm.html | 18 +- .../_autosummary/mlx.core.linalg.qr.html | 14 +- .../_autosummary/mlx.core.linalg.svd.html | 14 +- .../_autosummary/mlx.core.linalg.tri_inv.html | 12 +- .../_autosummary/mlx.core.linspace.html | 14 +- .../python/_autosummary/mlx.core.load.html | 20 +- .../python/_autosummary/mlx.core.log.html | 12 +- .../python/_autosummary/mlx.core.log10.html | 12 +- .../python/_autosummary/mlx.core.log1p.html | 12 +- .../python/_autosummary/mlx.core.log2.html | 12 +- .../_autosummary/mlx.core.logaddexp.html | 12 +- .../_autosummary/mlx.core.logical_and.html | 12 +- .../_autosummary/mlx.core.logical_not.html | 12 +- .../_autosummary/mlx.core.logical_or.html | 12 +- .../_autosummary/mlx.core.logsumexp.html | 16 +- .../python/_autosummary/mlx.core.matmul.html | 12 +- .../python/_autosummary/mlx.core.max.html | 16 +- .../python/_autosummary/mlx.core.maximum.html | 12 +- .../python/_autosummary/mlx.core.mean.html | 16 +- .../_autosummary/mlx.core.meshgrid.html | 18 +- .../mlx.core.metal.clear_cache.html | 12 +- .../mlx.core.metal.device_info.html | 14 +- .../mlx.core.metal.get_active_memory.html | 12 +- .../mlx.core.metal.get_cache_memory.html | 12 +- .../mlx.core.metal.get_peak_memory.html | 12 +- .../mlx.core.metal.is_available.html | 12 +- .../mlx.core.metal.reset_peak_memory.html | 12 +- .../mlx.core.metal.set_cache_limit.html | 16 +- .../mlx.core.metal.set_memory_limit.html | 18 +- .../mlx.core.metal.start_capture.html | 14 +- .../mlx.core.metal.stop_capture.html | 12 +- .../python/_autosummary/mlx.core.min.html | 16 +- .../python/_autosummary/mlx.core.minimum.html | 12 +- .../_autosummary/mlx.core.moveaxis.html | 16 +- .../_autosummary/mlx.core.multiply.html | 12 +- .../_autosummary/mlx.core.nan_to_num.html | 18 +- .../_autosummary/mlx.core.negative.html | 12 +- .../_autosummary/mlx.core.new_stream.html | 10 +- .../_autosummary/mlx.core.not_equal.html | 12 +- .../python/_autosummary/mlx.core.ones.html | 14 +- .../_autosummary/mlx.core.ones_like.html | 12 +- .../python/_autosummary/mlx.core.outer.html | 12 +- .../python/_autosummary/mlx.core.pad.html | 14 +- .../_autosummary/mlx.core.partition.html | 16 +- .../python/_autosummary/mlx.core.power.html | 12 +- .../python/_autosummary/mlx.core.prod.html | 16 +- .../_autosummary/mlx.core.put_along_axis.html | 14 +- .../_autosummary/mlx.core.quantize.html | 18 +- .../mlx.core.quantized_matmul.html | 18 +- .../python/_autosummary/mlx.core.radians.html | 12 +- .../mlx.core.random.bernoulli.html | 18 +- .../mlx.core.random.categorical.html | 18 +- .../_autosummary/mlx.core.random.gumbel.html | 14 +- .../_autosummary/mlx.core.random.key.html | 14 +- .../_autosummary/mlx.core.random.laplace.html | 24 +- .../mlx.core.random.multivariate_normal.html | 14 +- .../_autosummary/mlx.core.random.normal.html | 18 +- .../mlx.core.random.permutation.html | 998 ++++++++++++++++++ .../_autosummary/mlx.core.random.randint.html | 14 +- .../_autosummary/mlx.core.random.seed.html | 14 +- .../_autosummary/mlx.core.random.split.html | 14 +- .../mlx.core.random.truncated_normal.html | 14 +- .../_autosummary/mlx.core.random.uniform.html | 14 +- .../_autosummary/mlx.core.reciprocal.html | 12 +- .../_autosummary/mlx.core.remainder.html | 12 +- .../python/_autosummary/mlx.core.repeat.html | 16 +- .../python/_autosummary/mlx.core.reshape.html | 14 +- .../_autosummary/mlx.core.right_shift.html | 18 +- .../python/_autosummary/mlx.core.roll.html | 998 ++++++++++++++++++ .../python/_autosummary/mlx.core.round.html | 20 +- .../python/_autosummary/mlx.core.rsqrt.html | 12 +- .../python/_autosummary/mlx.core.save.html | 14 +- .../_autosummary/mlx.core.save_gguf.html | 20 +- .../mlx.core.save_safetensors.html | 16 +- .../python/_autosummary/mlx.core.savez.html | 14 +- .../mlx.core.savez_compressed.html | 14 +- .../mlx.core.set_default_device.html | 12 +- .../mlx.core.set_default_stream.html | 12 +- .../python/_autosummary/mlx.core.sigmoid.html | 12 +- .../python/_autosummary/mlx.core.sign.html | 12 +- .../python/_autosummary/mlx.core.sin.html | 12 +- .../python/_autosummary/mlx.core.sinh.html | 12 +- .../python/_autosummary/mlx.core.softmax.html | 14 +- .../python/_autosummary/mlx.core.sort.html | 14 +- .../python/_autosummary/mlx.core.split.html | 18 +- .../python/_autosummary/mlx.core.sqrt.html | 12 +- .../python/_autosummary/mlx.core.square.html | 12 +- .../python/_autosummary/mlx.core.squeeze.html | 14 +- .../python/_autosummary/mlx.core.stack.html | 16 +- .../python/_autosummary/mlx.core.std.html | 18 +- .../_autosummary/mlx.core.stop_gradient.html | 12 +- .../python/_autosummary/mlx.core.stream.html | 12 +- .../_autosummary/mlx.core.subtract.html | 12 +- .../python/_autosummary/mlx.core.sum.html | 16 +- .../_autosummary/mlx.core.swapaxes.html | 16 +- .../_autosummary/mlx.core.synchronize.html | 12 +- .../python/_autosummary/mlx.core.take.html | 16 +- .../mlx.core.take_along_axis.html | 14 +- .../python/_autosummary/mlx.core.tan.html | 12 +- .../python/_autosummary/mlx.core.tanh.html | 12 +- .../_autosummary/mlx.core.tensordot.html | 14 +- .../python/_autosummary/mlx.core.tile.html | 14 +- .../python/_autosummary/mlx.core.topk.html | 16 +- .../python/_autosummary/mlx.core.trace.html | 18 +- .../_autosummary/mlx.core.transpose.html | 14 +- .../python/_autosummary/mlx.core.tri.html | 18 +- .../python/_autosummary/mlx.core.tril.html | 14 +- .../python/_autosummary/mlx.core.triu.html | 14 +- .../_autosummary/mlx.core.value_and_grad.html | 16 +- .../python/_autosummary/mlx.core.var.html | 18 +- .../python/_autosummary/mlx.core.view.html | 12 +- .../python/_autosummary/mlx.core.vjp.html | 18 +- .../python/_autosummary/mlx.core.vmap.html | 16 +- .../python/_autosummary/mlx.core.where.html | 12 +- .../python/_autosummary/mlx.core.zeros.html | 14 +- .../_autosummary/mlx.core.zeros_like.html | 12 +- .../python/_autosummary/mlx.nn.quantize.html | 16 +- .../_autosummary/mlx.nn.value_and_grad.html | 12 +- .../mlx.optimizers.clip_grad_norm.html | 16 +- .../_autosummary/mlx.utils.tree_flatten.html | 16 +- .../_autosummary/mlx.utils.tree_map.html | 18 +- .../mlx.utils.tree_map_with_path.html | 14 +- .../_autosummary/mlx.utils.tree_reduce.html | 10 +- .../mlx.utils.tree_unflatten.html | 14 +- .../python/_autosummary/stream_class.html | 12 +- docs/build/html/python/array.html | 14 +- docs/build/html/python/data_types.html | 10 +- .../html/python/devices_and_streams.html | 10 +- docs/build/html/python/distributed.html | 10 +- docs/build/html/python/fast.html | 10 +- docs/build/html/python/fft.html | 10 +- docs/build/html/python/linalg.html | 10 +- docs/build/html/python/metal.html | 10 +- docs/build/html/python/nn.html | 10 +- .../python/nn/_autosummary/mlx.nn.ALiBi.html | 10 +- .../nn/_autosummary/mlx.nn.AvgPool1d.html | 18 +- .../nn/_autosummary/mlx.nn.AvgPool2d.html | 18 +- .../nn/_autosummary/mlx.nn.BatchNorm.html | 22 +- .../python/nn/_autosummary/mlx.nn.CELU.html | 10 +- .../python/nn/_autosummary/mlx.nn.Conv1d.html | 28 +- .../python/nn/_autosummary/mlx.nn.Conv2d.html | 26 +- .../python/nn/_autosummary/mlx.nn.Conv3d.html | 24 +- .../_autosummary/mlx.nn.ConvTranspose1d.html | 26 +- .../_autosummary/mlx.nn.ConvTranspose2d.html | 26 +- .../_autosummary/mlx.nn.ConvTranspose3d.html | 24 +- .../nn/_autosummary/mlx.nn.Dropout.html | 14 +- .../nn/_autosummary/mlx.nn.Dropout2d.html | 14 +- .../nn/_autosummary/mlx.nn.Dropout3d.html | 14 +- .../python/nn/_autosummary/mlx.nn.ELU.html | 10 +- .../nn/_autosummary/mlx.nn.Embedding.html | 16 +- .../python/nn/_autosummary/mlx.nn.GELU.html | 10 +- .../python/nn/_autosummary/mlx.nn.GLU.html | 14 +- .../python/nn/_autosummary/mlx.nn.GRU.html | 18 +- .../nn/_autosummary/mlx.nn.GroupNorm.html | 22 +- .../nn/_autosummary/mlx.nn.HardShrink.html | 10 +- .../nn/_autosummary/mlx.nn.HardTanh.html | 10 +- .../nn/_autosummary/mlx.nn.Hardswish.html | 10 +- .../nn/_autosummary/mlx.nn.InstanceNorm.html | 18 +- .../python/nn/_autosummary/mlx.nn.LSTM.html | 18 +- .../nn/_autosummary/mlx.nn.LayerNorm.html | 20 +- .../nn/_autosummary/mlx.nn.LeakyReLU.html | 10 +- .../python/nn/_autosummary/mlx.nn.Linear.html | 18 +- .../nn/_autosummary/mlx.nn.LogSigmoid.html | 10 +- .../nn/_autosummary/mlx.nn.LogSoftmax.html | 10 +- .../nn/_autosummary/mlx.nn.MaxPool1d.html | 18 +- .../nn/_autosummary/mlx.nn.MaxPool2d.html | 18 +- .../python/nn/_autosummary/mlx.nn.Mish.html | 10 +- .../nn/_autosummary/mlx.nn.Module.apply.html | 12 +- .../mlx.nn.Module.apply_to_modules.html | 12 +- .../_autosummary/mlx.nn.Module.children.html | 10 +- .../nn/_autosummary/mlx.nn.Module.eval.html | 10 +- .../mlx.nn.Module.filter_and_map.html | 12 +- .../nn/_autosummary/mlx.nn.Module.freeze.html | 18 +- .../mlx.nn.Module.leaf_modules.html | 10 +- .../mlx.nn.Module.load_weights.html | 16 +- .../_autosummary/mlx.nn.Module.modules.html | 10 +- .../mlx.nn.Module.named_modules.html | 10 +- .../mlx.nn.Module.parameters.html | 10 +- .../mlx.nn.Module.save_weights.html | 12 +- .../_autosummary/mlx.nn.Module.set_dtype.html | 12 +- .../nn/_autosummary/mlx.nn.Module.state.html | 10 +- .../nn/_autosummary/mlx.nn.Module.train.html | 14 +- .../mlx.nn.Module.trainable_parameters.html | 10 +- .../_autosummary/mlx.nn.Module.training.html | 10 +- .../_autosummary/mlx.nn.Module.unfreeze.html | 18 +- .../nn/_autosummary/mlx.nn.Module.update.html | 14 +- .../mlx.nn.Module.update_modules.html | 14 +- .../mlx.nn.MultiHeadAttention.html | 28 +- .../python/nn/_autosummary/mlx.nn.PReLU.html | 10 +- .../mlx.nn.QuantizedEmbedding.html | 20 +- .../_autosummary/mlx.nn.QuantizedLinear.html | 22 +- .../nn/_autosummary/mlx.nn.RMSNorm.html | 16 +- .../python/nn/_autosummary/mlx.nn.RNN.html | 18 +- .../python/nn/_autosummary/mlx.nn.ReLU.html | 10 +- .../python/nn/_autosummary/mlx.nn.ReLU6.html | 10 +- .../python/nn/_autosummary/mlx.nn.RoPE.html | 20 +- .../python/nn/_autosummary/mlx.nn.SELU.html | 10 +- .../nn/_autosummary/mlx.nn.Sequential.html | 12 +- .../python/nn/_autosummary/mlx.nn.SiLU.html | 10 +- .../nn/_autosummary/mlx.nn.Sigmoid.html | 10 +- .../mlx.nn.SinusoidalPositionalEncoding.html | 24 +- .../nn/_autosummary/mlx.nn.Softmax.html | 10 +- .../nn/_autosummary/mlx.nn.Softmin.html | 10 +- .../nn/_autosummary/mlx.nn.Softplus.html | 10 +- .../nn/_autosummary/mlx.nn.Softshrink.html | 10 +- .../nn/_autosummary/mlx.nn.Softsign.html | 10 +- .../python/nn/_autosummary/mlx.nn.Step.html | 12 +- .../python/nn/_autosummary/mlx.nn.Tanh.html | 10 +- .../nn/_autosummary/mlx.nn.Transformer.html | 26 +- .../nn/_autosummary/mlx.nn.Upsample.html | 18 +- .../nn/_autosummary/mlx.nn.init.constant.html | 14 +- .../mlx.nn.init.glorot_normal.html | 14 +- .../mlx.nn.init.glorot_uniform.html | 14 +- .../_autosummary/mlx.nn.init.he_normal.html | 14 +- .../_autosummary/mlx.nn.init.he_uniform.html | 14 +- .../nn/_autosummary/mlx.nn.init.identity.html | 12 +- .../nn/_autosummary/mlx.nn.init.normal.html | 16 +- .../nn/_autosummary/mlx.nn.init.uniform.html | 16 +- .../_autosummary_functions/mlx.nn.celu.html | 10 +- .../nn/_autosummary_functions/mlx.nn.elu.html | 10 +- .../_autosummary_functions/mlx.nn.gelu.html | 10 +- .../mlx.nn.gelu_approx.html | 10 +- .../mlx.nn.gelu_fast_approx.html | 10 +- .../nn/_autosummary_functions/mlx.nn.glu.html | 14 +- .../mlx.nn.hard_shrink.html | 10 +- .../mlx.nn.hard_tanh.html | 10 +- .../mlx.nn.hardswish.html | 10 +- .../mlx.nn.leaky_relu.html | 10 +- .../mlx.nn.log_sigmoid.html | 10 +- .../mlx.nn.log_softmax.html | 10 +- .../mlx.nn.losses.binary_cross_entropy.html | 16 +- .../mlx.nn.losses.cosine_similarity_loss.html | 18 +- .../mlx.nn.losses.cross_entropy.html | 18 +- .../mlx.nn.losses.gaussian_nll_loss.html | 18 +- .../mlx.nn.losses.hinge_loss.html | 14 +- .../mlx.nn.losses.huber_loss.html | 16 +- .../mlx.nn.losses.kl_div_loss.html | 16 +- .../mlx.nn.losses.l1_loss.html | 14 +- .../mlx.nn.losses.log_cosh_loss.html | 14 +- .../mlx.nn.losses.margin_ranking_loss.html | 16 +- .../mlx.nn.losses.mse_loss.html | 14 +- .../mlx.nn.losses.nll_loss.html | 16 +- .../mlx.nn.losses.smooth_l1_loss.html | 16 +- .../mlx.nn.losses.triplet_loss.html | 22 +- .../_autosummary_functions/mlx.nn.mish.html | 10 +- .../_autosummary_functions/mlx.nn.prelu.html | 10 +- .../_autosummary_functions/mlx.nn.relu.html | 10 +- .../_autosummary_functions/mlx.nn.relu6.html | 10 +- .../_autosummary_functions/mlx.nn.selu.html | 10 +- .../mlx.nn.sigmoid.html | 10 +- .../_autosummary_functions/mlx.nn.silu.html | 10 +- .../mlx.nn.softmax.html | 10 +- .../mlx.nn.softmin.html | 10 +- .../mlx.nn.softplus.html | 10 +- .../mlx.nn.softshrink.html | 12 +- .../_autosummary_functions/mlx.nn.step.html | 12 +- .../_autosummary_functions/mlx.nn.tanh.html | 10 +- docs/build/html/python/nn/functions.html | 10 +- docs/build/html/python/nn/init.html | 10 +- docs/build/html/python/nn/layers.html | 10 +- docs/build/html/python/nn/losses.html | 10 +- docs/build/html/python/nn/module.html | 10 +- docs/build/html/python/ops.html | 95 +- docs/build/html/python/optimizers.html | 10 +- .../_autosummary/mlx.optimizers.AdaDelta.html | 18 +- .../mlx.optimizers.Adafactor.html | 30 +- .../_autosummary/mlx.optimizers.Adagrad.html | 16 +- .../_autosummary/mlx.optimizers.Adam.html | 18 +- .../_autosummary/mlx.optimizers.AdamW.html | 20 +- .../_autosummary/mlx.optimizers.Adamax.html | 18 +- .../_autosummary/mlx.optimizers.Lion.html | 18 +- ....optimizers.Optimizer.apply_gradients.html | 16 +- .../mlx.optimizers.Optimizer.init.html | 14 +- .../mlx.optimizers.Optimizer.state.html | 10 +- .../mlx.optimizers.Optimizer.update.html | 14 +- .../_autosummary/mlx.optimizers.RMSprop.html | 18 +- .../_autosummary/mlx.optimizers.SGD.html | 22 +- .../mlx.optimizers.cosine_decay.html | 18 +- .../mlx.optimizers.exponential_decay.html | 16 +- .../mlx.optimizers.join_schedules.html | 16 +- .../mlx.optimizers.linear_schedule.html | 18 +- .../mlx.optimizers.step_decay.html | 18 +- .../python/optimizers/common_optimizers.html | 10 +- .../html/python/optimizers/optimizer.html | 10 +- .../html/python/optimizers/schedulers.html | 10 +- docs/build/html/python/random.html | 13 +- docs/build/html/python/transforms.html | 16 +- docs/build/html/python/tree_utils.html | 10 +- docs/build/html/search.html | 10 +- docs/build/html/searchindex.js | 2 +- ...1core_1_1_contiguous_iterator-members.html | 93 -- ...ctmlx_1_1core_1_1_contiguous_iterator.html | 191 ---- docs/build/html/usage/compile.html | 10 +- docs/build/html/usage/distributed.html | 10 +- .../build/html/usage/function_transforms.html | 14 +- docs/build/html/usage/indexing.html | 16 +- docs/build/html/usage/lazy_evaluation.html | 12 +- docs/build/html/usage/numpy.html | 16 +- docs/build/html/usage/quick_start.html | 10 +- docs/build/html/usage/saving_and_loading.html | 12 +- docs/build/html/usage/unified_memory.html | 10 +- docs/build/html/usage/using_streams.html | 10 +- 496 files changed, 5955 insertions(+), 3210 deletions(-) create mode 100644 docs/build/html/_sources/python/_autosummary/mlx.core.random.permutation.rst create mode 100644 docs/build/html/_sources/python/_autosummary/mlx.core.roll.rst create mode 100644 docs/build/html/python/_autosummary/mlx.core.random.permutation.html create mode 100644 docs/build/html/python/_autosummary/mlx.core.roll.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_contiguous_iterator-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_contiguous_iterator.html diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index bfb5ce6e3..fcec0f83f 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 85eddbee44d4b85d5bc17c721e79c928 +config: afad7f1e99088fbef94fcb4df3f67506 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.random.permutation.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.random.permutation.rst new file mode 100644 index 000000000..3e0ce913e --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.random.permutation.rst @@ -0,0 +1,6 @@ +mlx.core.random.permutation +=========================== + +.. currentmodule:: mlx.core.random + +.. autofunction:: permutation \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.roll.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.roll.rst new file mode 100644 index 000000000..4aa94949a --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.roll.rst @@ -0,0 +1,6 @@ +mlx.core.roll +============= + +.. currentmodule:: mlx.core + +.. autofunction:: roll \ No newline at end of file diff --git a/docs/build/html/_sources/python/ops.rst b/docs/build/html/_sources/python/ops.rst index e0d70ea14..e3c50e2ff 100644 --- a/docs/build/html/_sources/python/ops.rst +++ b/docs/build/html/_sources/python/ops.rst @@ -130,6 +130,7 @@ Operations repeat reshape right_shift + roll round rsqrt save diff --git a/docs/build/html/_sources/python/random.rst b/docs/build/html/_sources/python/random.rst index 5d98304bb..248959108 100644 --- a/docs/build/html/_sources/python/random.rst +++ b/docs/build/html/_sources/python/random.rst @@ -45,3 +45,4 @@ we use a splittable version of Threefry, which is a counter-based PRNG. truncated_normal uniform laplace + permutation diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index ca5dbe08b..6fe754faf 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.18.0', + VERSION: '0.18.1', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/cpp/ops.html b/docs/build/html/cpp/ops.html index 407ce2662..0fc669da6 100644 --- a/docs/build/html/cpp/ops.html +++ b/docs/build/html/cpp/ops.html @@ -8,7 +8,7 @@ - Operations — MLX 0.18.0 documentation + Operations — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -425,6 +426,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms @@ -2923,6 +2931,37 @@ document.write(` array view(const array &a, const Dtype &dtype, StreamOrDevice s = {})#
    +
    +
    +array roll(const array &a, int shift, StreamOrDevice s = {})#
    +

    Roll elements along an axis and introduce them on the other side.

    +
    + +
    +
    +array roll(const array &a, const std::vector<int> &shift, StreamOrDevice s = {})#
    +
    + +
    +
    +array roll(const array &a, int shift, int axis, StreamOrDevice s = {})#
    +
    + +
    +
    +array roll(const array &a, int shift, const std::vector<int> &axes, StreamOrDevice s = {})#
    +
    + +
    +
    +array roll(const array &a, const std::vector<int> &shift, int axis, StreamOrDevice s = {})#
    +
    + +
    +
    +array roll(const array &a, const std::vector<int> &shift, const std::vector<int> &axes, StreamOrDevice s = {})#
    +
    + @@ -3269,6 +3308,12 @@ document.write(`
  • right_shift()
  • operator>>()
  • view()
  • +
  • roll()
  • +
  • roll()
  • +
  • roll()
  • +
  • roll()
  • +
  • roll()
  • +
  • roll()
  • diff --git a/docs/build/html/dev/custom_metal_kernels.html b/docs/build/html/dev/custom_metal_kernels.html index c4b1975d4..2c0fdcd59 100644 --- a/docs/build/html/dev/custom_metal_kernels.html +++ b/docs/build/html/dev/custom_metal_kernels.html @@ -8,7 +8,7 @@ - Custom Metal Kernels — MLX 0.18.0 documentation + Custom Metal Kernels — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -130,8 +130,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -369,6 +369,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -424,6 +425,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms - +
  • Transforms
  • Transforms
  • Transforms
      @@ -878,7 +880,7 @@ document.write(`

      A device to run operations on.

      -__init__(self, type: mlx.core.DeviceType, index: int = 0) None#
      +__init__(self, type: mlx.core.DeviceType, index: int = 0) None#

      Methods

      diff --git a/docs/build/html/python/_autosummary/mlx.core.Dtype.html b/docs/build/html/python/_autosummary/mlx.core.Dtype.html index 7cdee3468..c4f1514b1 100644 --- a/docs/build/html/python/_autosummary/mlx.core.Dtype.html +++ b/docs/build/html/python/_autosummary/mlx.core.Dtype.html @@ -8,7 +8,7 @@ - mlx.core.Dtype — MLX 0.18.0 documentation + mlx.core.Dtype — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.addmm#

      -addmm(c: array, a: array, b: array, /, alpha: float = 1.0, beta: float = 1.0, *, stream: None | Stream | Device = None) array#
      +addmm(c: array, a: array, b: array, /, alpha: float = 1.0, beta: float = 1.0, *, stream: None | Stream | Device = None) array#

      Matrix multiplication with addition and optional scaling.

      Perform the (possibly batched) matrix multiplication of two arrays and add to the result with optional scaling factors.

      @@ -881,9 +883,9 @@ with optional scaling factors.

    • c (array) – Input array or scalar.

    • a (array) – Input array or scalar.

    • b (array) – Input array or scalar.

    • -
    • alpha (float, optional) – Scaling factor for the +

    • alpha (float, optional) – Scaling factor for the matrix product of a and b (default: 1)

    • -
    • beta (float, optional) – Scaling factor for c (default: 1)

    • +
    • beta (float, optional) – Scaling factor for c (default: 1)

    Returns:
    diff --git a/docs/build/html/python/_autosummary/mlx.core.all.html b/docs/build/html/python/_autosummary/mlx.core.all.html index e00ea9552..c5c1acd89 100644 --- a/docs/build/html/python/_autosummary/mlx.core.all.html +++ b/docs/build/html/python/_autosummary/mlx.core.all.html @@ -8,7 +8,7 @@ - mlx.core.all — MLX 0.18.0 documentation + mlx.core.all — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -425,6 +426,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms
      @@ -871,16 +873,16 @@ document.write(`

      mlx.core.all#

      -all(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#
      +all(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

      An and reduction over the given axes.

      Parameters:
      • a (array) – Input array.

      • -
      • axis (int or list(int), optional) – Optional axis or +

      • axis (int or list(int), optional) – Optional axis or axes to reduce over. If unspecified this defaults to reducing over the entire array.

      • -
      • keepdims (bool, optional) – Keep reduced axes as +

      • keepdims (bool, optional) – Keep reduced axes as singleton dimensions, defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.allclose.html b/docs/build/html/python/_autosummary/mlx.core.allclose.html index eb86cae35..6d0e1a616 100644 --- a/docs/build/html/python/_autosummary/mlx.core.allclose.html +++ b/docs/build/html/python/_autosummary/mlx.core.allclose.html @@ -8,7 +8,7 @@ - mlx.core.allclose — MLX 0.18.0 documentation + mlx.core.allclose — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.allclose#

      -allclose(a: array, b: array, /, rtol: float = 1e-05, atol: float = 1e-08, *, equal_nan: bool = False, stream: None | Stream | Device = None) array#
      +allclose(a: array, b: array, /, rtol: float = 1e-05, atol: float = 1e-08, *, equal_nan: bool = False, stream: None | Stream | Device = None) array#

      Approximate comparison of two arrays.

      Infinite values are considered equal if they have the same sign, NaN values are not equal unless equal_nan is True.

      The arrays are considered equal if:

      @@ -885,9 +887,9 @@ broadcasting.

      • a (array) – Input array.

      • b (array) – Input array.

      • -
      • rtol (float) – Relative tolerance.

      • -
      • atol (float) – Absolute tolerance.

      • -
      • equal_nan (bool) – If True, NaNs are considered equal. +

      • rtol (float) – Relative tolerance.

      • +
      • atol (float) – Absolute tolerance.

      • +
      • equal_nan (bool) – If True, NaNs are considered equal. Defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.any.html b/docs/build/html/python/_autosummary/mlx.core.any.html index 2b33cd99d..bf4f11379 100644 --- a/docs/build/html/python/_autosummary/mlx.core.any.html +++ b/docs/build/html/python/_autosummary/mlx.core.any.html @@ -8,7 +8,7 @@ - mlx.core.any — MLX 0.18.0 documentation + mlx.core.any — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,16 +873,16 @@ document.write(`

      mlx.core.any#

      -any(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#
      +any(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

      An or reduction over the given axes.

      Parameters:
      • a (array) – Input array.

      • -
      • axis (int or list(int), optional) – Optional axis or +

      • axis (int or list(int), optional) – Optional axis or axes to reduce over. If unspecified this defaults to reducing over the entire array.

      • -
      • keepdims (bool, optional) – Keep reduced axes as +

      • keepdims (bool, optional) – Keep reduced axes as singleton dimensions, defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.arange.html b/docs/build/html/python/_autosummary/mlx.core.arange.html index 138628131..8ec7fe317 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arange.html +++ b/docs/build/html/python/_autosummary/mlx.core.arange.html @@ -8,7 +8,7 @@ - mlx.core.arange — MLX 0.18.0 documentation + mlx.core.arange — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,38 +873,34 @@ document.write(`

      mlx.core.arange#

      -arange(start: int | float, stop: int | float, step: None | int | float, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array#
      +arange(start: int | float, stop: int | float, step: None | int | float, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array#
      -arange(stop: int | float, step: None | int | float = None, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array
      -

      Generates ranges of numbers.

      +arange(stop: int | float, step: None | int | float = None, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array +

      Overloaded function.

      +
        +
      1. arange(start : Union[int, float], stop : Union[int, float], step : Union[None, int, float], dtype: Optional[Dtype] = None, *, stream: Union[None, Stream, Device] = None) -> array

        +
        +

        Generates ranges of numbers.

        Generate numbers in the half-open interval [start, stop) in increments of step.

        -
        -
        Parameters:
        -
          -
        • start (float or int, optional) – Starting value which defaults to 0.

        • -
        • stop (float or int) – Stopping value.

        • -
        • step (float or int, optional) – Increment which defaults to 1.

        • -
        • dtype (Dtype, optional) – Specifies the data type of the output. -If unspecified will default to float32 if any of start, -stop, or step are float. Otherwise will default to -int32.

        • -
        +
        +
        Args:

        start (float or int, optional): Starting value which defaults to 0. +stop (float or int): Stopping value. +step (float or int, optional): Increment which defaults to 1. +dtype (Dtype, optional): Specifies the data type of the output. If unspecified will default to float32 if any of start, stop, or step are float. Otherwise will default to int32.

        -
        Returns:
        -

        The range of values.

        +
        Returns:

        array: The range of values.

        -
        Return type:
        -

        array

        -
        -
        -
        -

        Note

        -

        Following the Numpy convention the actual increment used to +

        Note:

        Following the Numpy convention the actual increment used to generate numbers is dtype(start + step) - dtype(start). This can lead to unexpected results for example if start + step is a fractional value and the dtype is integral.

        -
        +
      +
      + + +
    • arange(stop : Union[int, float], step : Union[None, int, float] = None, dtype: Optional[Dtype] = None, *, stream: Union[None, Stream, Device] = None) -> array

    • + diff --git a/docs/build/html/python/_autosummary/mlx.core.arccos.html b/docs/build/html/python/_autosummary/mlx.core.arccos.html index 39323b182..4fb8526b3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arccos.html +++ b/docs/build/html/python/_autosummary/mlx.core.arccos.html @@ -8,7 +8,7 @@ - mlx.core.arccos — MLX 0.18.0 documentation + mlx.core.arccos — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,15 +873,15 @@ document.write(`

      mlx.core.argmax#

      -argmax(a: array, /, axis: None | int = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#
      +argmax(a: array, /, axis: None | int = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

      Indices of the maximum values along the axis.

      Parameters:
      • a (array) – Input array.

      • -
      • axis (int, optional) – Optional axis to reduce over. If unspecified +

      • axis (int, optional) – Optional axis to reduce over. If unspecified this defaults to reducing over the entire array.

      • -
      • keepdims (bool, optional) – Keep reduced axes as +

      • keepdims (bool, optional) – Keep reduced axes as singleton dimensions, defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.argmin.html b/docs/build/html/python/_autosummary/mlx.core.argmin.html index 61b07853d..7addbd5ad 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argmin.html +++ b/docs/build/html/python/_autosummary/mlx.core.argmin.html @@ -8,7 +8,7 @@ - mlx.core.argmin — MLX 0.18.0 documentation + mlx.core.argmin — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,15 +873,15 @@ document.write(`

      mlx.core.argmin#

      -argmin(a: array, /, axis: None | int = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#
      +argmin(a: array, /, axis: None | int = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

      Indices of the minimum values along the axis.

      Parameters:
      • a (array) – Input array.

      • -
      • axis (int, optional) – Optional axis to reduce over. If unspecified +

      • axis (int, optional) – Optional axis to reduce over. If unspecified this defaults to reducing over the entire array.

      • -
      • keepdims (bool, optional) – Keep reduced axes as +

      • keepdims (bool, optional) – Keep reduced axes as singleton dimensions, defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.argpartition.html b/docs/build/html/python/_autosummary/mlx.core.argpartition.html index 88cf0ba7f..e6ad208be 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argpartition.html +++ b/docs/build/html/python/_autosummary/mlx.core.argpartition.html @@ -8,7 +8,7 @@ - mlx.core.argpartition — MLX 0.18.0 documentation + mlx.core.argpartition — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.argpartition#

      -argpartition(a: array, /, kth: int, axis: None | int = -1, *, stream: None | Stream | Device = None) array#
      +argpartition(a: array, /, kth: int, axis: None | int = -1, *, stream: None | Stream | Device = None) array#

      Returns the indices that partition the array.

      The ordering of the elements within a partition in given by the indices is undefined.

      @@ -879,12 +881,12 @@ is undefined.

      Parameters:
      • a (array) – Input array.

      • -
      • kth (int) – Element index at the kth position in the output will +

      • kth (int) – Element index at the kth position in the output will give the sorted position. All indices before the kth position will be of elements less or equal to the element at the kth index and all indices after will be of elements greater or equal to the element at the kth index.

      • -
      • axis (int or None, optional) – Optional axis to partition over. +

      • axis (int or None, optional) – Optional axis to partition over. If None, this partitions over the flattened array. If unspecified, it defaults to -1.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.argsort.html b/docs/build/html/python/_autosummary/mlx.core.argsort.html index 9b2f652af..dbf779c55 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argsort.html +++ b/docs/build/html/python/_autosummary/mlx.core.argsort.html @@ -8,7 +8,7 @@ - mlx.core.argsort — MLX 0.18.0 documentation + mlx.core.argsort — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,13 +873,13 @@ document.write(`

      mlx.core.argsort#

      -argsort(a: array, /, axis: None | int = -1, *, stream: None | Stream | Device = None) array#
      +argsort(a: array, /, axis: None | int = -1, *, stream: None | Stream | Device = None) array#

      Returns the indices that sort the array.

      Parameters:
      • a (array) – Input array.

      • -
      • axis (int or None, optional) – Optional axis to sort over. +

      • axis (int or None, optional) – Optional axis to sort over. If None, this sorts over the flattened array. If unspecified, it defaults to -1 (sorting over the last axis).

      diff --git a/docs/build/html/python/_autosummary/mlx.core.array.T.html b/docs/build/html/python/_autosummary/mlx.core.array.T.html index b4ffb0515..03467eb58 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.T.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.T.html @@ -8,7 +8,7 @@ - mlx.core.array.T — MLX 0.18.0 documentation + mlx.core.array.T — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.array.item#

      -array.item(self) object#
      +array.item(self) object#

      Access the value of a scalar array.

      Returns:
      diff --git a/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html b/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html index d6e1a3b53..cad425e14 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html @@ -8,7 +8,7 @@ - mlx.core.array.itemsize — MLX 0.18.0 documentation + mlx.core.array.itemsize — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,8 +873,8 @@ document.write(`

      mlx.core.array.tolist#

      -array.tolist(self) object#
      -

      Convert the array to a Python list.

      +array.tolist(self) object# +

      Convert the array to a Python list.

      Returns:

      The Python list.

      @@ -884,7 +886,7 @@ list of lists.

      Return type:
      -

      list

      +

      list

      diff --git a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html index 51c9f1e9f..285a9b777 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html @@ -8,7 +8,7 @@ - mlx.core.array.transpose — MLX 0.18.0 documentation + mlx.core.array.transpose — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.array_equal#

      -array_equal(a: scalar | array, b: scalar | array, equal_nan: bool = False, stream: None | Stream | Device = None) array#
      +array_equal(a: scalar | array, b: scalar | array, equal_nan: bool = False, stream: None | Stream | Device = None) array#

      Array equality check.

      Compare two arrays for equality. Returns True if and only if the arrays have the same shape and their values are equal. The arrays need not have @@ -881,7 +883,7 @@ the same type to be considered equal.

      • a (array) – Input array or scalar.

      • b (array) – Input array or scalar.

      • -
      • equal_nan (bool) – If True, NaNs are considered equal. +

      • equal_nan (bool) – If True, NaNs are considered equal. Defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.as_strided.html b/docs/build/html/python/_autosummary/mlx.core.as_strided.html index 3613643b2..c14b2325f 100644 --- a/docs/build/html/python/_autosummary/mlx.core.as_strided.html +++ b/docs/build/html/python/_autosummary/mlx.core.as_strided.html @@ -8,7 +8,7 @@ - mlx.core.as_strided — MLX 0.18.0 documentation + mlx.core.as_strided — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.as_strided#

      -as_strided(a: array, /, shape: Sequence[int] | None = None, strides: Sequence[int] | None = None, offset: int = 0, *, stream: None | Stream | Device = None) array#
      +as_strided(a: array, /, shape: Sequence[int] | None = None, strides: Sequence[int] | None = None, offset: int = 0, *, stream: None | Stream | Device = None) array#

      Create a view into the array with the given shape and strides.

      The resulting array will always be as if the provided array was row contiguous regardless of the provided arrays storage order and current @@ -887,12 +889,12 @@ result into crashes.

      Parameters:
      • a (array) – Input array

      • -
      • shape (list(int), optional) – The shape of the resulting array. If +

      • shape (list(int), optional) – The shape of the resulting array. If None it defaults to a.shape().

      • -
      • strides (list(int), optional) – The strides of the resulting array. If +

      • strides (list(int), optional) – The strides of the resulting array. If None it defaults to the reverse exclusive cumulative product of a.shape().

      • -
      • offset (int) – Skip that many elements from the beginning of the input +

      • offset (int) – Skip that many elements from the beginning of the input array.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html b/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html index 547dc727b..aa484178d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html +++ b/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html @@ -8,7 +8,7 @@ - mlx.core.atleast_1d — MLX 0.18.0 documentation + mlx.core.atleast_1d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.bitwise_and#

      -bitwise_and(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +bitwise_and(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise bitwise and.

      Take the bitwise and of two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html b/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html index f23a06561..38ef639a7 100644 --- a/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html +++ b/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html @@ -8,7 +8,7 @@ - mlx.core.bitwise_or — MLX 0.18.0 documentation + mlx.core.bitwise_or — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.bitwise_or#

      -bitwise_or(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +bitwise_or(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise bitwise or.

      Take the bitwise or of two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html b/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html index e299b8a1e..6a6547f73 100644 --- a/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html +++ b/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html @@ -8,7 +8,7 @@ - mlx.core.bitwise_xor — MLX 0.18.0 documentation + mlx.core.bitwise_xor — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.bitwise_xor#

      -bitwise_xor(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +bitwise_xor(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise bitwise xor.

      Take the bitwise exclusive or of two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be diff --git a/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html b/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html index 4dc4b70fc..909acc9a1 100644 --- a/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html +++ b/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html @@ -8,7 +8,7 @@ - mlx.core.block_masked_mm — MLX 0.18.0 documentation + mlx.core.block_masked_mm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -371,6 +371,7 @@

    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -426,6 +427,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -872,7 +874,7 @@ document.write(`

      mlx.core.block_masked_mm#

      -block_masked_mm(a: array, b: array, /, block_size: int = 64, mask_out: array | None = None, mask_lhs: array | None = None, mask_rhs: array | None = None, *, stream: None | Stream | Device = None) array#
      +block_masked_mm(a: array, b: array, /, block_size: int = 64, mask_out: array | None = None, mask_lhs: array | None = None, mask_rhs: array | None = None, *, stream: None | Stream | Device = None) array#

      Matrix multiplication with block masking.

      Perform the (possibly batched) matrix multiplication of two arrays and with blocks of size block_size x block_size optionally masked out.

      @@ -888,7 +890,7 @@ of size block_size<
      • a (array) – Input array or scalar.

      • b (array) – Input array or scalar.

      • -
      • block_size (int) – Size of blocks to be masked. Must be 32 or 64. Default: 64.

      • +
      • block_size (int) – Size of blocks to be masked. Must be 32 or 64. Default: 64.

      • mask_out (array, optional) – Mask for output. Default: None.

      • mask_lhs (array, optional) – Mask for a. Default: None.

      • mask_rhs (array, optional) – Mask for b. Default: None.

      • diff --git a/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html b/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html index 2a670dbe6..3b2de5706 100644 --- a/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html +++ b/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html @@ -8,7 +8,7 @@ - mlx.core.broadcast_to — MLX 0.18.0 documentation + mlx.core.broadcast_to — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,14 +873,14 @@ document.write(`

        mlx.core.broadcast_to#

        -broadcast_to(a: scalar | array, /, shape: Sequence[int], *, stream: None | Stream | Device = None) array#
        +broadcast_to(a: scalar | array, /, shape: Sequence[int], *, stream: None | Stream | Device = None) array#

        Broadcast an array to the given shape.

        The broadcasting semantics are the same as Numpy.

        Parameters:
        • a (array) – Input array.

        • -
        • shape (list(int)) – The shape to broadcast to.

        • +
        • shape (list(int)) – The shape to broadcast to.

        Returns:
        diff --git a/docs/build/html/python/_autosummary/mlx.core.ceil.html b/docs/build/html/python/_autosummary/mlx.core.ceil.html index 6b40079bd..bbd4efccd 100644 --- a/docs/build/html/python/_autosummary/mlx.core.ceil.html +++ b/docs/build/html/python/_autosummary/mlx.core.ceil.html @@ -8,7 +8,7 @@ - mlx.core.ceil — MLX 0.18.0 documentation + mlx.core.ceil — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
    • Transforms
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.compile#

        -compile(fun: Callable, inputs: object | None = None, outputs: object | None = None, shapeless: bool = False) Callable#
        +compile(fun: Callable, inputs: object | None = None, outputs: object | None = None, shapeless: bool = False) Callable#

        Returns a compiled function which produces the same output as fun.

        Parameters:
        @@ -879,17 +881,17 @@ document.write(`
      • fun (Callable) – A function which takes a variable number of array or trees of array and returns a variable number of array or trees of array.

      • -
      • inputs (list or dict, optional) – These inputs will be captured during +

      • inputs (list or dict, optional) – These inputs will be captured during the function compilation along with the inputs to fun. The inputs -can be a list or a dict containing arbitrarily nested +can be a list or a dict containing arbitrarily nested lists, dictionaries, or arrays. Leaf nodes that are not array are ignored. Default: None

      • -
      • outputs (list or dict, optional) – These outputs will be captured and +

      • outputs (list or dict, optional) – These outputs will be captured and updated in a compiled function. The outputs can be a -list or a dict containing arbitrarily nested lists, +list or a dict containing arbitrarily nested lists, dictionaries, or arrays. Leaf nodes that are not array are ignored. Default: None

      • -
      • shapeless (bool, optional) – A function compiled with the shapeless +

      • shapeless (bool, optional) – A function compiled with the shapeless option enabled will not be recompiled when the input shape changes. Not all functions can be compiled with shapeless enabled. Attempting to compile such functions with shapeless enabled will throw. Note, changing the number diff --git a/docs/build/html/python/_autosummary/mlx.core.concatenate.html b/docs/build/html/python/_autosummary/mlx.core.concatenate.html index 213bbb104..b4836e3a5 100644 --- a/docs/build/html/python/_autosummary/mlx.core.concatenate.html +++ b/docs/build/html/python/_autosummary/mlx.core.concatenate.html @@ -8,7 +8,7 @@ - mlx.core.concatenate — MLX 0.18.0 documentation + mlx.core.concatenate — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@

      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
    • Transforms
    • Transforms
    • Transforms
        @@ -871,17 +873,17 @@ document.write(`

        mlx.core.conv1d#

        -conv1d(input: array, weight: array, /, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
        +conv1d(input: array, weight: array, /, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

        1D convolution over an input with several channels

        Parameters:
        • input (array) – Input array of shape (N, H, C_in).

        • weight (array) – Weight array of shape (C_out, H, C_in).

        • -
        • stride (int, optional) – Kernel stride. Default: 1.

        • -
        • padding (int, optional) – Input padding. Default: 0.

        • -
        • dilation (int, optional) – Kernel dilation. Default: 1.

        • -
        • groups (int, optional) – Input feature groups. Default: 1.

        • +
        • stride (int, optional) – Kernel stride. Default: 1.

        • +
        • padding (int, optional) – Input padding. Default: 0.

        • +
        • dilation (int, optional) – Kernel dilation. Default: 1.

        • +
        • groups (int, optional) – Input feature groups. Default: 1.

        Returns:
        diff --git a/docs/build/html/python/_autosummary/mlx.core.conv2d.html b/docs/build/html/python/_autosummary/mlx.core.conv2d.html index 3f4429b5d..b3c6273b8 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv2d.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv2d.html @@ -8,7 +8,7 @@ - mlx.core.conv2d — MLX 0.18.0 documentation + mlx.core.conv2d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,23 +873,23 @@ document.write(`

        mlx.core.conv2d#

        -conv2d(input: array, weight: array, /, stride: int | tuple[int, int] = 1, padding: int | tuple[int, int] = 0, dilation: int | tuple[int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
        +conv2d(input: array, weight: array, /, stride: int | tuple[int, int] = 1, padding: int | tuple[int, int] = 0, dilation: int | tuple[int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

        2D convolution over an input with several channels

        Parameters:
        • input (array) – Input array of shape (N, H, W, C_in).

        • weight (array) – Weight array of shape (C_out, H, W, C_in).

        • -
        • stride (int or tuple(int), optional) – tuple of size 2 with +

        • stride (int or tuple(int), optional) – tuple of size 2 with kernel strides. All spatial dimensions get the same stride if only one number is specified. Default: 1.

        • -
        • padding (int or tuple(int), optional) – tuple of size 2 with +

        • padding (int or tuple(int), optional) – tuple of size 2 with symmetric input padding. All spatial dimensions get the same padding if only one number is specified. Default: 0.

        • -
        • dilation (int or tuple(int), optional) – tuple of size 2 with +

        • dilation (int or tuple(int), optional) – tuple of size 2 with kernel dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

        • -
        • groups (int, optional) – input feature groups. Default: 1.

        • +
        • groups (int, optional) – input feature groups. Default: 1.

        Returns:
        diff --git a/docs/build/html/python/_autosummary/mlx.core.conv3d.html b/docs/build/html/python/_autosummary/mlx.core.conv3d.html index f10d332ff..b51a1b9c6 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv3d.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv3d.html @@ -8,7 +8,7 @@ - mlx.core.conv3d — MLX 0.18.0 documentation + mlx.core.conv3d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.conv3d#

        -conv3d(input: array, weight: array, /, stride: int | tuple[int, int, int] = 1, padding: int | tuple[int, int, int] = 0, dilation: int | tuple[int, int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
        +conv3d(input: array, weight: array, /, stride: int | tuple[int, int, int] = 1, padding: int | tuple[int, int, int] = 0, dilation: int | tuple[int, int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

        3D convolution over an input with several channels

        Note: Only the default groups=1 is currently supported.

        @@ -879,16 +881,16 @@ document.write(`
        • input (array) – Input array of shape (N, D, H, W, C_in).

        • weight (array) – Weight array of shape (C_out, D, H, W, C_in).

        • -
        • stride (int or tuple(int), optional) – tuple of size 3 with +

        • stride (int or tuple(int), optional) – tuple of size 3 with kernel strides. All spatial dimensions get the same stride if only one number is specified. Default: 1.

        • -
        • padding (int or tuple(int), optional) – tuple of size 3 with +

        • padding (int or tuple(int), optional) – tuple of size 3 with symmetric input padding. All spatial dimensions get the same padding if only one number is specified. Default: 0.

        • -
        • dilation (int or tuple(int), optional) – tuple of size 3 with +

        • dilation (int or tuple(int), optional) – tuple of size 3 with kernel dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

        • -
        • groups (int, optional) – input feature groups. Default: 1.

        • +
        • groups (int, optional) – input feature groups. Default: 1.

        Returns:
        diff --git a/docs/build/html/python/_autosummary/mlx.core.conv_general.html b/docs/build/html/python/_autosummary/mlx.core.conv_general.html index 5c4d8ed9f..87d61193e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv_general.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv_general.html @@ -8,7 +8,7 @@ - mlx.core.conv_general — MLX 0.18.0 documentation + mlx.core.conv_general — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,26 +873,26 @@ document.write(`

        mlx.core.conv_general#

        -conv_general(input: array, weight: array, /, stride: int | Sequence[int] = 1, padding: int | Sequence[int] | tuple[Sequence[int], Sequence[int]] = 0, kernel_dilation: int | Sequence[int] = 1, input_dilation: int | Sequence[int] = 1, groups: int = 1, flip: bool = False, *, stream: None | Stream | Device = None) array#
        +conv_general(input: array, weight: array, /, stride: int | Sequence[int] = 1, padding: int | Sequence[int] | tuple[Sequence[int], Sequence[int]] = 0, kernel_dilation: int | Sequence[int] = 1, input_dilation: int | Sequence[int] = 1, groups: int = 1, flip: bool = False, *, stream: None | Stream | Device = None) array#

        General convolution over an input with several channels

        Parameters:
        • input (array) – Input array of shape (N, ..., C_in).

        • weight (array) – Weight array of shape (C_out, ..., C_in).

        • -
        • stride (int or list(int), optional) – list with kernel strides. +

        • stride (int or list(int), optional) – list with kernel strides. All spatial dimensions get the same stride if only one number is specified. Default: 1.

        • -
        • padding (int, list(int), or tuple(list(int), list(int)), optional) – list with input padding. All spatial dimensions get the same +

        • padding (int, list(int), or tuple(list(int), list(int)), optional) – list with input padding. All spatial dimensions get the same padding if only one number is specified. Default: 0.

        • -
        • kernel_dilation (int or list(int), optional) – list with +

        • kernel_dilation (int or list(int), optional) – list with kernel dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

        • -
        • input_dilation (int or list(int), optional) – list with +

        • input_dilation (int or list(int), optional) – list with input dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

        • -
        • groups (int, optional) – Input feature groups. Default: 1.

        • -
        • flip (bool, optional) – Flip the order in which the spatial dimensions of +

        • groups (int, optional) – Input feature groups. Default: 1.

        • +
        • flip (bool, optional) – Flip the order in which the spatial dimensions of the weights are processed. Performs the cross-correlation operator when flip is False and the convolution operator otherwise. Default: False.

        • diff --git a/docs/build/html/python/_autosummary/mlx.core.conv_transpose1d.html b/docs/build/html/python/_autosummary/mlx.core.conv_transpose1d.html index aa2e52695..922f00ace 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv_transpose1d.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv_transpose1d.html @@ -8,7 +8,7 @@ - mlx.core.conv_transpose1d — MLX 0.18.0 documentation + mlx.core.conv_transpose1d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,17 +873,17 @@ document.write(`

          mlx.core.conv_transpose1d#

          -conv_transpose1d(input: array, weight: array, /, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
          +conv_transpose1d(input: array, weight: array, /, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

          1D transposed convolution over an input with several channels

          Parameters:
          • input (array) – Input array of shape (N, H, C_in).

          • weight (array) – Weight array of shape (C_out, H, C_in).

          • -
          • stride (int, optional) – Kernel stride. Default: 1.

          • -
          • padding (int, optional) – Input padding. Default: 0.

          • -
          • dilation (int, optional) – Kernel dilation. Default: 1.

          • -
          • groups (int, optional) – Input feature groups. Default: 1.

          • +
          • stride (int, optional) – Kernel stride. Default: 1.

          • +
          • padding (int, optional) – Input padding. Default: 0.

          • +
          • dilation (int, optional) – Kernel dilation. Default: 1.

          • +
          • groups (int, optional) – Input feature groups. Default: 1.

          Returns:
          diff --git a/docs/build/html/python/_autosummary/mlx.core.conv_transpose2d.html b/docs/build/html/python/_autosummary/mlx.core.conv_transpose2d.html index 5a7bc8e07..0f9116a7a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv_transpose2d.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv_transpose2d.html @@ -8,7 +8,7 @@ - mlx.core.conv_transpose2d — MLX 0.18.0 documentation + mlx.core.conv_transpose2d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.conv_transpose2d#

          -conv_transpose2d(input: array, weight: array, /, stride: int | Tuple[int, int] = 1, padding: int | Tuple[int, int] = 0, dilation: int | Tuple[int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
          +conv_transpose2d(input: array, weight: array, /, stride: int | Tuple[int, int] = 1, padding: int | Tuple[int, int] = 0, dilation: int | Tuple[int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

          2D transposed convolution over an input with several channels

          Note: Only the default groups=1 is currently supported.

          @@ -879,16 +881,16 @@ document.write(`
          • input (array) – Input array of shape (N, H, W, C_in).

          • weight (array) – Weight array of shape (C_out, H, W, C_in).

          • -
          • stride (int or tuple(int), optional) – tuple of size 2 with +

          • stride (int or tuple(int), optional) – tuple of size 2 with kernel strides. All spatial dimensions get the same stride if only one number is specified. Default: 1.

          • -
          • padding (int or tuple(int), optional) – tuple of size 2 with +

          • padding (int or tuple(int), optional) – tuple of size 2 with symmetric input padding. All spatial dimensions get the same padding if only one number is specified. Default: 0.

          • -
          • dilation (int or tuple(int), optional) – tuple of size 2 with +

          • dilation (int or tuple(int), optional) – tuple of size 2 with kernel dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

          • -
          • groups (int, optional) – input feature groups. Default: 1.

          • +
          • groups (int, optional) – input feature groups. Default: 1.

          Returns:
          diff --git a/docs/build/html/python/_autosummary/mlx.core.conv_transpose3d.html b/docs/build/html/python/_autosummary/mlx.core.conv_transpose3d.html index 056a3fc49..dd672e57e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.conv_transpose3d.html +++ b/docs/build/html/python/_autosummary/mlx.core.conv_transpose3d.html @@ -8,7 +8,7 @@ - mlx.core.conv_transpose3d — MLX 0.18.0 documentation + mlx.core.conv_transpose3d — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.conv_transpose3d#

          -conv_transpose3d(input: array, weight: array, /, stride: int | Tuple[int, int, int] = 1, padding: int | Tuple[int, int, int] = 0, dilation: int | Tuple[int, int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#
          +conv_transpose3d(input: array, weight: array, /, stride: int | Tuple[int, int, int] = 1, padding: int | Tuple[int, int, int] = 0, dilation: int | Tuple[int, int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

          3D transposed convolution over an input with several channels

          Note: Only the default groups=1 is currently supported.

          @@ -879,16 +881,16 @@ document.write(`
          • input (array) – Input array of shape (N, D, H, W, C_in).

          • weight (array) – Weight array of shape (C_out, D, H, W, C_in).

          • -
          • stride (int or tuple(int), optional) – tuple of size 3 with +

          • stride (int or tuple(int), optional) – tuple of size 3 with kernel strides. All spatial dimensions get the same stride if only one number is specified. Default: 1.

          • -
          • padding (int or tuple(int), optional) – tuple of size 3 with +

          • padding (int or tuple(int), optional) – tuple of size 3 with symmetric input padding. All spatial dimensions get the same padding if only one number is specified. Default: 0.

          • -
          • dilation (int or tuple(int), optional) – tuple of size 3 with +

          • dilation (int or tuple(int), optional) – tuple of size 3 with kernel dilation. All spatial dimensions get the same dilation if only one number is specified. Default: 1

          • -
          • groups (int, optional) – input feature groups. Default: 1.

          • +
          • groups (int, optional) – input feature groups. Default: 1.

          Returns:
          diff --git a/docs/build/html/python/_autosummary/mlx.core.convolve.html b/docs/build/html/python/_autosummary/mlx.core.convolve.html index b01c30c18..2a4f7bb80 100644 --- a/docs/build/html/python/_autosummary/mlx.core.convolve.html +++ b/docs/build/html/python/_autosummary/mlx.core.convolve.html @@ -8,7 +8,7 @@ - mlx.core.convolve — MLX 0.18.0 documentation + mlx.core.convolve — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.convolve#

          -convolve(a: array, v: array, /, mode: str = 'full', *, stream: None | Stream | Device = None) array#
          +convolve(a: array, v: array, /, mode: str = 'full', *, stream: None | Stream | Device = None) array#

          The discrete convolution of 1D arrays.

          If v is longer than a, then they are swapped. The conv filter is flipped following signal processing convention.

          @@ -880,7 +882,7 @@ The conv filter is flipped following signal processing convention.

          • a (array) – 1D Input array.

          • v (array) – 1D Input array.

          • -
          • mode (str, optional) – {‘full’, ‘valid’, ‘same’}

          • +
          • mode (str, optional) – {‘full’, ‘valid’, ‘same’}

          Returns:
          diff --git a/docs/build/html/python/_autosummary/mlx.core.cos.html b/docs/build/html/python/_autosummary/mlx.core.cos.html index 72923915e..559d0f57f 100644 --- a/docs/build/html/python/_autosummary/mlx.core.cos.html +++ b/docs/build/html/python/_autosummary/mlx.core.cos.html @@ -8,7 +8,7 @@ - mlx.core.cos — MLX 0.18.0 documentation + mlx.core.cos — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
      • Transforms
      • Transforms
          @@ -871,17 +873,17 @@ document.write(`

          mlx.core.cummax#

          -cummax(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#
          +cummax(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

          Return the cumulative maximum of the elements along the given axis.

          Parameters:
          • a (array) – Input array

          • -
          • axis (int, optional) – Optional axis to compute the cumulative maximum +

          • axis (int, optional) – Optional axis to compute the cumulative maximum over. If unspecified the cumulative maximum of the flattened array is returned.

          • -
          • reverse (bool) – Perform the cumulative maximum in reverse.

          • -
          • inclusive (bool) – The i-th element of the output includes the i-th +

          • reverse (bool) – Perform the cumulative maximum in reverse.

          • +
          • inclusive (bool) – The i-th element of the output includes the i-th element of the input.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.cummin.html b/docs/build/html/python/_autosummary/mlx.core.cummin.html index 059c22455..0e3edf7ef 100644 --- a/docs/build/html/python/_autosummary/mlx.core.cummin.html +++ b/docs/build/html/python/_autosummary/mlx.core.cummin.html @@ -8,7 +8,7 @@ - mlx.core.cummin — MLX 0.18.0 documentation + mlx.core.cummin — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,17 +873,17 @@ document.write(`

          mlx.core.cummin#

          -cummin(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#
          +cummin(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

          Return the cumulative minimum of the elements along the given axis.

          Parameters:
          • a (array) – Input array

          • -
          • axis (int, optional) – Optional axis to compute the cumulative minimum +

          • axis (int, optional) – Optional axis to compute the cumulative minimum over. If unspecified the cumulative minimum of the flattened array is returned.

          • -
          • reverse (bool) – Perform the cumulative minimum in reverse.

          • -
          • inclusive (bool) – The i-th element of the output includes the i-th +

          • reverse (bool) – Perform the cumulative minimum in reverse.

          • +
          • inclusive (bool) – The i-th element of the output includes the i-th element of the input.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.cumprod.html b/docs/build/html/python/_autosummary/mlx.core.cumprod.html index 14ddcf9c3..cad69637a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.cumprod.html +++ b/docs/build/html/python/_autosummary/mlx.core.cumprod.html @@ -8,7 +8,7 @@ - mlx.core.cumprod — MLX 0.18.0 documentation + mlx.core.cumprod — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,17 +873,17 @@ document.write(`

          mlx.core.cumprod#

          -cumprod(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#
          +cumprod(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

          Return the cumulative product of the elements along the given axis.

          Parameters:
          • a (array) – Input array

          • -
          • axis (int, optional) – Optional axis to compute the cumulative product +

          • axis (int, optional) – Optional axis to compute the cumulative product over. If unspecified the cumulative product of the flattened array is returned.

          • -
          • reverse (bool) – Perform the cumulative product in reverse.

          • -
          • inclusive (bool) – The i-th element of the output includes the i-th +

          • reverse (bool) – Perform the cumulative product in reverse.

          • +
          • inclusive (bool) – The i-th element of the output includes the i-th element of the input.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.cumsum.html b/docs/build/html/python/_autosummary/mlx.core.cumsum.html index 456ba11cd..4f263bda5 100644 --- a/docs/build/html/python/_autosummary/mlx.core.cumsum.html +++ b/docs/build/html/python/_autosummary/mlx.core.cumsum.html @@ -8,7 +8,7 @@ - mlx.core.cumsum — MLX 0.18.0 documentation + mlx.core.cumsum — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,17 +873,17 @@ document.write(`

          mlx.core.cumsum#

          -cumsum(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#
          +cumsum(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

          Return the cumulative sum of the elements along the given axis.

          Parameters:
          • a (array) – Input array

          • -
          • axis (int, optional) – Optional axis to compute the cumulative sum +

          • axis (int, optional) – Optional axis to compute the cumulative sum over. If unspecified the cumulative sum of the flattened array is returned.

          • -
          • reverse (bool) – Perform the cumulative sum in reverse.

          • -
          • inclusive (bool) – The i-th element of the output includes the i-th +

          • reverse (bool) – Perform the cumulative sum in reverse.

          • +
          • inclusive (bool) – The i-th element of the output includes the i-th element of the input.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.custom_function.html b/docs/build/html/python/_autosummary/mlx.core.custom_function.html index ad59d5644..26dfb5ce4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.custom_function.html +++ b/docs/build/html/python/_autosummary/mlx.core.custom_function.html @@ -8,7 +8,7 @@ - mlx.core.custom_function — MLX 0.18.0 documentation + mlx.core.custom_function — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
      • Transforms
      • Transforms
      • Transforms
      • Transforms
          @@ -872,7 +874,7 @@ document.write(`

          mlx.core.dequantize#

          -dequantize(w: array, /, scales: array, biases: array, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#
          +dequantize(w: array, /, scales: array, biases: array, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#

          Dequantize the matrix w using the provided scales and biases and the group_size and bits configuration.

          Formally, given the notation in quantize(), we compute @@ -886,9 +888,9 @@ document.write(`

        • w (array) – Matrix to be quantized

        • scales (array) – The scales to use per group_size elements of w

        • biases (array) – The biases to use per group_size elements of w

        • -
        • group_size (int, optional) – The size of the group in w that shares a +

        • group_size (int, optional) – The size of the group in w that shares a scale and bias. Default: 64.

        • -
        • bits (int, optional) – The number of bits occupied by each element in +

        • bits (int, optional) – The number of bits occupied by each element in w. Default: 4.

      • diff --git a/docs/build/html/python/_autosummary/mlx.core.diag.html b/docs/build/html/python/_autosummary/mlx.core.diag.html index 7fa56b472..0444122f4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.diag.html +++ b/docs/build/html/python/_autosummary/mlx.core.diag.html @@ -8,7 +8,7 @@ - mlx.core.diag — MLX 0.18.0 documentation + mlx.core.diag — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -371,6 +371,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -426,6 +427,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -872,7 +874,7 @@ document.write(`

        mlx.core.diag#

        -diag(a: array, /, k: int = 0, *, stream: None | Stream | Device = None) array#
        +diag(a: array, /, k: int = 0, *, stream: None | Stream | Device = None) array#

        Extract a diagonal or construct a diagonal matrix. If a is 1-D then a diagonal matrix is constructed with a on the \(k\)-th diagonal. If a is 2-D then the \(k\)-th diagonal is @@ -881,7 +883,7 @@ returned.

        Parameters:
        • a (array) – 1-D or 2-D input array.

        • -
        • k (int, optional) – The diagonal to extract or construct. +

        • k (int, optional) – The diagonal to extract or construct. Default: 0.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.diagonal.html b/docs/build/html/python/_autosummary/mlx.core.diagonal.html index 2600e1eb6..9f3d24332 100644 --- a/docs/build/html/python/_autosummary/mlx.core.diagonal.html +++ b/docs/build/html/python/_autosummary/mlx.core.diagonal.html @@ -8,7 +8,7 @@ - mlx.core.diagonal — MLX 0.18.0 documentation + mlx.core.diagonal — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.diagonal#

        -diagonal(a: array, offset: int = 0, axis1: int = 0, axis2: int = 1, stream: None | Stream | Device = None) array#
        +diagonal(a: array, offset: int = 0, axis1: int = 0, axis2: int = 1, stream: None | Stream | Device = None) array#

        Return specified diagonals.

        If a is 2-D, then a 1-D array containing the diagonal at the given offset is returned.

        @@ -883,11 +885,11 @@ new dimension inserted at the end corresponding to the diagonal.

        Parameters:
        • a (array) – Input array

        • -
        • offset (int, optional) – Offset of the diagonal from the main diagonal. +

        • offset (int, optional) – Offset of the diagonal from the main diagonal. Can be positive or negative. Default: 0.

        • -
        • axis1 (int, optional) – The first axis of the 2-D sub-arrays from which +

        • axis1 (int, optional) – The first axis of the 2-D sub-arrays from which the diagonals should be taken. Default: 0.

        • -
        • axis2 (int, optional) – The second axis of the 2-D sub-arrays from which +

        • axis2 (int, optional) – The second axis of the 2-D sub-arrays from which the diagonals should be taken. Default: 1.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.disable_compile.html b/docs/build/html/python/_autosummary/mlx.core.disable_compile.html index 7965a432f..f36033ef9 100644 --- a/docs/build/html/python/_autosummary/mlx.core.disable_compile.html +++ b/docs/build/html/python/_autosummary/mlx.core.disable_compile.html @@ -8,7 +8,7 @@ - mlx.core.disable_compile — MLX 0.18.0 documentation + mlx.core.disable_compile — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.disable_compile#

        -disable_compile() None#
        +disable_compile() None#

        Globally disable compilation. Setting the environment variable MLX_DISABLE_COMPILE can also be used to disable compilation.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.Group.html b/docs/build/html/python/_autosummary/mlx.core.distributed.Group.html index ef224f63b..30109f924 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.Group.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.Group.html @@ -8,7 +8,7 @@ - mlx.core.distributed.Group — MLX 0.18.0 documentation + mlx.core.distributed.Group — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.all_gather.html b/docs/build/html/python/_autosummary/mlx.core.distributed.all_gather.html index 27ebc79b3..c702a2966 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.all_gather.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.all_gather.html @@ -8,7 +8,7 @@ - mlx.core.distributed.all_gather — MLX 0.18.0 documentation + mlx.core.distributed.all_gather — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.distributed.all_gather#

        -all_gather(x: array, *, group: Group | None = None, stream: None | Stream | Device = None) array#
        +all_gather(x: array, *, group: Group | None = None, stream: None | Stream | Device = None) array#

        Gather arrays from all processes.

        Gather the x arrays from all processes in the group and concatenate them along the first axis. The arrays should all have the same shape.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.all_sum.html b/docs/build/html/python/_autosummary/mlx.core.distributed.all_sum.html index be7a1245e..9818c1da5 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.all_sum.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.all_sum.html @@ -8,7 +8,7 @@ - mlx.core.distributed.all_sum — MLX 0.18.0 documentation + mlx.core.distributed.all_sum — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
    • Transforms
        @@ -871,11 +873,11 @@ document.write(`

        mlx.core.distributed.init#

        -init(strict: bool = False) Group#
        +init(strict: bool = False) Group#

        Initialize the communication backend and create the global communication group.

        Parameters:
        -

        strict (bool, optional) – If set to False it returns a singleton group +

        strict (bool, optional) – If set to False it returns a singleton group in case mx.distributed.is_available() returns False otherwise it throws a runtime error. Default: False

        diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.is_available.html b/docs/build/html/python/_autosummary/mlx.core.distributed.is_available.html index 0251d0ac0..200d9f0b7 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.is_available.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.is_available.html @@ -8,7 +8,7 @@ - mlx.core.distributed.is_available — MLX 0.18.0 documentation + mlx.core.distributed.is_available — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.distributed.is_available#

        -is_available() bool#
        +is_available() bool#

        Check if a communication backend is available.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.recv.html b/docs/build/html/python/_autosummary/mlx.core.distributed.recv.html index 3ef42743f..04ada83be 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.recv.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.recv.html @@ -8,7 +8,7 @@ - mlx.core.distributed.recv — MLX 0.18.0 documentation + mlx.core.distributed.recv — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,15 +873,15 @@ document.write(`

        mlx.core.distributed.recv#

        -recv(shape: Sequence[int], dtype: Dtype, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#
        +recv(shape: Sequence[int], dtype: Dtype, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#

        Recv an array with shape shape and dtype dtype from process with rank src.

        Parameters:
          -
        • shape (Tuple[int]) – The shape of the array we are receiving.

        • +
        • shape (Tuple[int]) – The shape of the array we are receiving.

        • dtype (Dtype) – The data type of the array we are receiving.

        • -
        • src (int) – Rank of the source process in the group.

        • +
        • src (int) – Rank of the source process in the group.

        • group (Group) – The group of processes that will participate in the recv. If set to None the global group is used. Default: None.

        • diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.recv_like.html b/docs/build/html/python/_autosummary/mlx.core.distributed.recv_like.html index f86ab1c63..7bb347286 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.recv_like.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.recv_like.html @@ -8,7 +8,7 @@ - mlx.core.distributed.recv_like — MLX 0.18.0 documentation + mlx.core.distributed.recv_like — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.distributed.recv_like#

          -recv_like(x: array, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#
          +recv_like(x: array, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#

          Recv an array with shape and type like x from process with rank src.

          It is equivalent to calling mx.distributed.recv(x.shape, x.dtype, src).

          @@ -880,7 +882,7 @@ document.write(`
          • x (array) – An array defining the shape and dtype of the array we are receiving.

          • -
          • src (int) – Rank of the source process in the group.

          • +
          • src (int) – Rank of the source process in the group.

          • group (Group) – The group of processes that will participate in the recv. If set to None the global group is used. Default: None.

          • diff --git a/docs/build/html/python/_autosummary/mlx.core.distributed.send.html b/docs/build/html/python/_autosummary/mlx.core.distributed.send.html index b577c93c2..351411e3c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.distributed.send.html +++ b/docs/build/html/python/_autosummary/mlx.core.distributed.send.html @@ -8,7 +8,7 @@ - mlx.core.distributed.send — MLX 0.18.0 documentation + mlx.core.distributed.send — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
          • mlx.core.repeat
          • mlx.core.reshape
          • mlx.core.right_shift
          • +
          • mlx.core.roll
          • mlx.core.round
          • mlx.core.rsqrt
          • mlx.core.save
          • @@ -425,6 +426,7 @@
          • mlx.core.random.truncated_normal
          • mlx.core.random.uniform
          • mlx.core.random.laplace
          • +
          • mlx.core.random.permutation
        • Transforms
            @@ -871,14 +873,14 @@ document.write(`

            mlx.core.distributed.send#

            -send(x: array, dst: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#
            +send(x: array, dst: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#

            Send an array from the current process to the process that has rank dst in the group.

            Parameters:
            • x (array) – Input array.

            • -
            • dst (int) – Rank of the destination process in the group.

            • +
            • dst (int) – Rank of the destination process in the group.

            • group (Group) – The group of processes that will participate in the sned. If set to None the global group is used. Default: None.

            • diff --git a/docs/build/html/python/_autosummary/mlx.core.divide.html b/docs/build/html/python/_autosummary/mlx.core.divide.html index 07d03463f..9f0e45503 100644 --- a/docs/build/html/python/_autosummary/mlx.core.divide.html +++ b/docs/build/html/python/_autosummary/mlx.core.divide.html @@ -8,7 +8,7 @@ - mlx.core.divide — MLX 0.18.0 documentation + mlx.core.divide — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
            • mlx.core.repeat
            • mlx.core.reshape
            • mlx.core.right_shift
            • +
            • mlx.core.roll
            • mlx.core.round
            • mlx.core.rsqrt
            • mlx.core.save
            • @@ -425,6 +426,7 @@
            • mlx.core.random.truncated_normal
            • mlx.core.random.uniform
            • mlx.core.random.laplace
            • +
            • mlx.core.random.permutation
          • Transforms
          • Transforms
              @@ -871,7 +873,7 @@ document.write(`

              mlx.core.divmod#

              -divmod(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
              +divmod(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

              Element-wise quotient and remainder.

              The fuction divmod(a, b) is equivalent to but faster than (a // b, a % b). The function uses numpy-style broadcasting @@ -887,7 +889,7 @@ semantics. Either or both input arrays can also be scalars.

              The quotient a // b and remainder a % b.

              Return type:
              -

              tuple(array, array)

              +

              tuple(array, array)

          • diff --git a/docs/build/html/python/_autosummary/mlx.core.einsum.html b/docs/build/html/python/_autosummary/mlx.core.einsum.html index 9c069ab4f..b522b7c10 100644 --- a/docs/build/html/python/_autosummary/mlx.core.einsum.html +++ b/docs/build/html/python/_autosummary/mlx.core.einsum.html @@ -8,7 +8,7 @@ - mlx.core.einsum — MLX 0.18.0 documentation + mlx.core.einsum — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
          • mlx.core.repeat
          • mlx.core.reshape
          • mlx.core.right_shift
          • +
          • mlx.core.roll
          • mlx.core.round
          • mlx.core.rsqrt
          • mlx.core.save
          • @@ -425,6 +426,7 @@
          • mlx.core.random.truncated_normal
          • mlx.core.random.uniform
          • mlx.core.random.laplace
          • +
          • mlx.core.random.permutation
        • Transforms
            @@ -871,12 +873,12 @@ document.write(`

            mlx.core.einsum#

            -einsum(subscripts: str, *operands, stream: None | Stream | Device = None) array#
            +einsum(subscripts: str, *operands, stream: None | Stream | Device = None) array#

            Perform the Einstein summation convention on the operands.

            Parameters:
              -
            • subscripts (str) – The Einstein summation convention equation.

            • +
            • subscripts (str) – The Einstein summation convention equation.

            • *operands (array) – The input arrays.

            diff --git a/docs/build/html/python/_autosummary/mlx.core.einsum_path.html b/docs/build/html/python/_autosummary/mlx.core.einsum_path.html index 3950d836f..76ab75cba 100644 --- a/docs/build/html/python/_autosummary/mlx.core.einsum_path.html +++ b/docs/build/html/python/_autosummary/mlx.core.einsum_path.html @@ -8,7 +8,7 @@ - mlx.core.einsum_path — MLX 0.18.0 documentation + mlx.core.einsum_path — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
          • mlx.core.repeat
          • mlx.core.reshape
          • mlx.core.right_shift
          • +
          • mlx.core.roll
          • mlx.core.round
          • mlx.core.rsqrt
          • mlx.core.save
          • @@ -425,6 +426,7 @@
          • mlx.core.random.truncated_normal
          • mlx.core.random.uniform
          • mlx.core.random.laplace
          • +
          • mlx.core.random.permutation
        • Transforms
            @@ -871,12 +873,12 @@ document.write(`

            mlx.core.einsum_path#

            -einsum_path(subscripts: str, *operands)#
            +einsum_path(subscripts: str, *operands)#

            Compute the contraction order for the given Einstein summation.

            Parameters:
              -
            • subscripts (str) – The Einstein summation convention equation.

            • +
            • subscripts (str) – The Einstein summation convention equation.

            • *operands (array) – The input arrays.

            @@ -885,7 +887,7 @@ document.write(` chosen path.

            Return type:
            -

            tuple(list(tuple(int, int)), str)

            +

            tuple(list(tuple(int, int)), str)

        • diff --git a/docs/build/html/python/_autosummary/mlx.core.enable_compile.html b/docs/build/html/python/_autosummary/mlx.core.enable_compile.html index 69639aefc..ac9020322 100644 --- a/docs/build/html/python/_autosummary/mlx.core.enable_compile.html +++ b/docs/build/html/python/_autosummary/mlx.core.enable_compile.html @@ -8,7 +8,7 @@ - mlx.core.enable_compile — MLX 0.18.0 documentation + mlx.core.enable_compile — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.enable_compile#

          -enable_compile() None#
          +enable_compile() None#

          Globally enable compilation. This will override the environment variable MLX_DISABLE_COMPILE if set.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.equal.html b/docs/build/html/python/_autosummary/mlx.core.equal.html index 0b7058312..79ef51f7a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.equal.html +++ b/docs/build/html/python/_autosummary/mlx.core.equal.html @@ -8,7 +8,7 @@ - mlx.core.equal — MLX 0.18.0 documentation + mlx.core.equal — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
      • Transforms
      • Transforms
      • Transforms
          @@ -871,13 +873,13 @@ document.write(`

          mlx.core.eval#

          -eval(*args) None#
          +eval(*args) None#

          Evaluate an array or tree of array.

          Parameters:

          *args (arrays or trees of arrays) – Each argument can be a single array or a tree of arrays. If a tree is given the nodes can be a Python -list, tuple or dict. Leaves which are not +list, tuple or dict. Leaves which are not arrays are ignored.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.exp.html b/docs/build/html/python/_autosummary/mlx.core.exp.html index 4a7d5b9b7..c2f2c3dd7 100644 --- a/docs/build/html/python/_autosummary/mlx.core.exp.html +++ b/docs/build/html/python/_autosummary/mlx.core.exp.html @@ -8,7 +8,7 @@ - mlx.core.exp — MLX 0.18.0 documentation + mlx.core.exp — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
      • Transforms
      • Transforms
      • Transforms
          @@ -871,14 +873,14 @@ document.write(`

          mlx.core.eye#

          -eye(n: int, m: int | None = None, k: int = 0, dtype: Dtype | None = float32, *, stream: None | Stream | Device = None) array#
          +eye(n: int, m: int | None = None, k: int = 0, dtype: Dtype | None = float32, *, stream: None | Stream | Device = None) array#

          Create an identity matrix or a general diagonal matrix.

          Parameters:
            -
          • n (int) – The number of rows in the output.

          • -
          • m (int, optional) – The number of columns in the output. Defaults to n.

          • -
          • k (int, optional) – Index of the diagonal. Defaults to 0 (main diagonal).

          • +
          • n (int) – The number of rows in the output.

          • +
          • m (int, optional) – The number of columns in the output. Defaults to n.

          • +
          • k (int, optional) – Index of the diagonal. Defaults to 0 (main diagonal).

          • dtype (Dtype, optional) – Data type of the output array. Defaults to float32.

          • stream (Stream, optional) – Stream or device. Defaults to None.

          diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.affine_quantize.html b/docs/build/html/python/_autosummary/mlx.core.fast.affine_quantize.html index 6a9992222..ed72ab74d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.affine_quantize.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.affine_quantize.html @@ -8,7 +8,7 @@ - mlx.core.fast.affine_quantize — MLX 0.18.0 documentation + mlx.core.fast.affine_quantize — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -371,6 +371,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -426,6 +427,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -872,7 +874,7 @@ document.write(`

          mlx.core.fast.affine_quantize#

          -affine_quantize(w: array, /, scales: array, biases: array, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#
          +affine_quantize(w: array, /, scales: array, biases: array, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#

          Quantize the matrix w using the provided scales and biases and the group_size and bits configuration.

          Formally, given the notation in quantize(), we compute @@ -886,9 +888,9 @@ document.write(`

        • w (array) – Matrix to be quantize

        • scales (array) – The scales to use per group_size elements of w

        • biases (array) – The biases to use per group_size elements of w

        • -
        • group_size (int, optional) – The size of the group in w that shares a +

        • group_size (int, optional) – The size of the group in w that shares a scale and bias. (default: 64)

        • -
        • bits (int, optional) – The number of bits occupied by each element in +

        • bits (int, optional) – The number of bits occupied by each element in w. (default: 4)

      • diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.layer_norm.html b/docs/build/html/python/_autosummary/mlx.core.fast.layer_norm.html index 731b38d51..92a09b51d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.layer_norm.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.layer_norm.html @@ -8,7 +8,7 @@ - mlx.core.fast.layer_norm — MLX 0.18.0 documentation + mlx.core.fast.layer_norm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.fast.layer_norm#

        -layer_norm(x: array, weight: array | None, bias: array | None, eps: float, *, stream: None | Stream | Device = None) array#
        +layer_norm(x: array, weight: array | None, bias: array | None, eps: float, *, stream: None | Stream | Device = None) array#

        Layer normalization.

        The normalization is with respect to the last axis of the input x.

        @@ -884,7 +886,7 @@ as the last axis of

        bias (array, optional) – An additive offset to be added to the result. The bias should be one-dimensional with the same size as the last axis of x. If set to None then no translation happens.

        -
      • eps (float) – A small additive constant for numerical stability.

      • +
      • eps (float) – A small additive constant for numerical stability.

    • Returns:
      diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.metal_kernel.html b/docs/build/html/python/_autosummary/mlx.core.fast.metal_kernel.html index e0dfe9c60..bffb146c4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.metal_kernel.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.metal_kernel.html @@ -8,7 +8,7 @@ - mlx.core.fast.metal_kernel — MLX 0.18.0 documentation + mlx.core.fast.metal_kernel — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,24 +873,24 @@ document.write(`

      mlx.core.fast.metal_kernel#

      -metal_kernel(name: str, input_names: Sequence[str], output_names: Sequence[str], source: str, header: str = '', ensure_row_contiguous: bool = True, atomic_outputs: bool = False) object#
      +metal_kernel(name: str, input_names: Sequence[str], output_names: Sequence[str], source: str, header: str = '', ensure_row_contiguous: bool = True, atomic_outputs: bool = False) object#

      A jit-compiled custom Metal kernel defined from a source string.

      Parameters:
        -
      • name (str) – Name for the kernel.

      • -
      • input_names (List[str]) – The parameter names of the inputs in the +

      • name (str) – Name for the kernel.

      • +
      • input_names (List[str]) – The parameter names of the inputs in the function signature.

      • -
      • output_names (List[str]) – The parameter names of the outputs in the +

      • output_names (List[str]) – The parameter names of the outputs in the function signature.

      • -
      • source (str) – Source code. This is the body of a function in Metal, +

      • source (str) – Source code. This is the body of a function in Metal, the function signature will be automatically generated.

      • -
      • header (str) – Header source code to include before the main function. +

      • header (str) – Header source code to include before the main function. Useful for helper functions or includes that should live outside of the main function body.

      • -
      • ensure_row_contiguous (bool) – Whether to ensure the inputs are row contiguous +

      • ensure_row_contiguous (bool) – Whether to ensure the inputs are row contiguous before the kernel runs. Default: True.

      • -
      • atomic_outputs (bool) – Whether to use atomic outputs in the function signature +

      • atomic_outputs (bool) – Whether to use atomic outputs in the function signature e.g. device atomic<float>. Default: False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.rms_norm.html b/docs/build/html/python/_autosummary/mlx.core.fast.rms_norm.html index dfd83aa18..487efb3e9 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.rms_norm.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.rms_norm.html @@ -8,7 +8,7 @@ - mlx.core.fast.rms_norm — MLX 0.18.0 documentation + mlx.core.fast.rms_norm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fast.rms_norm#

      -rms_norm(x: array, weight: array, eps: float, *, stream: None | Stream | Device = None) array#
      +rms_norm(x: array, weight: array, eps: float, *, stream: None | Stream | Device = None) array#

      Root Mean Square normalization (RMS norm).

      The normalization is with respect to the last axis of the input x.

      @@ -881,7 +883,7 @@ document.write(`
    • weight (array) – A multiplicative weight to scale the result by. The weight should be one-dimensional with the same size as the last axis of x.

    • -
    • eps (float) – A small additive constant for numerical stability.

    • +
    • eps (float) – A small additive constant for numerical stability.

    Returns:
    diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.rope.html b/docs/build/html/python/_autosummary/mlx.core.fast.rope.html index 27710b82e..6e75f0db9 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.rope.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.rope.html @@ -8,7 +8,7 @@ - mlx.core.fast.rope — MLX 0.18.0 documentation + mlx.core.fast.rope — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -425,6 +426,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms
      @@ -871,21 +873,21 @@ document.write(`

      mlx.core.fast.rope#

      -rope(a: array, dims: int, *, traditional: bool, base: float | None, scale: float, offset: int, freqs: array | None = None, stream: None | Stream | Device = None) array#
      +rope(a: array, dims: int, *, traditional: bool, base: float | None, scale: float, offset: int, freqs: array | None = None, stream: None | Stream | Device = None) array#

      Apply rotary positional encoding to the input.

      Parameters:
      • a (array) – Input array.

      • -
      • dims (int) – The feature dimensions to be rotated. If the input feature +

      • dims (int) – The feature dimensions to be rotated. If the input feature is larger than dims then the rest is left unchanged.

      • -
      • traditional (bool) – If set to True choose the traditional +

      • traditional (bool) – If set to True choose the traditional implementation which rotates consecutive dimensions.

      • -
      • base (float, optional) – The base used to compute angular frequency for +

      • base (float, optional) – The base used to compute angular frequency for each dimension in the positional encodings. Exactly one of base and freqs must be None.

      • -
      • scale (float) – The scale used to scale the positions.

      • -
      • offset (int) – The position offset to start at.

      • +
      • scale (float) – The scale used to scale the positions.

      • +
      • offset (int) – The position offset to start at.

      • freqs (array, optional) – Optional frequencies to use with RoPE. If set, the base parameter must be None. Default: None.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fast.scaled_dot_product_attention.html b/docs/build/html/python/_autosummary/mlx.core.fast.scaled_dot_product_attention.html index d3ef49eeb..44d8ae7c4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fast.scaled_dot_product_attention.html +++ b/docs/build/html/python/_autosummary/mlx.core.fast.scaled_dot_product_attention.html @@ -8,7 +8,7 @@ - mlx.core.fast.scaled_dot_product_attention — MLX 0.18.0 documentation + mlx.core.fast.scaled_dot_product_attention — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fast.scaled_dot_product_attention#

      -scaled_dot_product_attention(q: array, k: array, v: array, *, scale: float, mask: array | None = None, stream: None | Stream | Device = None) array#
      +scaled_dot_product_attention(q: array, k: array, v: array, *, scale: float, mask: array | None = None, stream: None | Stream | Device = None) array#

      A fast implementation of multi-head attention: O = softmax(Q @ K.T, dim=-1) @ V.

      Supports:

        @@ -889,7 +891,7 @@ and v
      • q (array) – Input query array.

      • k (array) – Input keys array.

      • v (array) – Input values array.

      • -
      • scale (float) – Scale for queries (typically 1.0 / sqrt(q.shape(-1))

      • +
      • scale (float) – Scale for queries (typically 1.0 / sqrt(q.shape(-1))

      • mask (array, optional) – An additive mask to apply to the query-key scores.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.fft.html b/docs/build/html/python/_autosummary/mlx.core.fft.fft.html index dcb9b413d..d7c9b687a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.fft.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.fft.html @@ -8,7 +8,7 @@ - mlx.core.fft.fft — MLX 0.18.0 documentation + mlx.core.fft.fft — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,16 +873,16 @@ document.write(`

      mlx.core.fft.fft#

      -fft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#
      +fft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#

      One dimensional discrete Fourier Transform.

      Parameters:
      • a (array) – The input array.

      • -
      • n (int, optional) – Size of the transformed axis. The +

      • n (int, optional) – Size of the transformed axis. The corresponding axis in the input is truncated or padded with zeros to match n. The default value is a.shape[axis].

      • -
      • axis (int, optional) – Axis along which to perform the FFT. The +

      • axis (int, optional) – Axis along which to perform the FFT. The default is -1.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html index 9638a265d..5aa06395a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html @@ -8,7 +8,7 @@ - mlx.core.fft.fft2 — MLX 0.18.0 documentation + mlx.core.fft.fft2 — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
      @@ -871,16 +873,16 @@ document.write(`

      mlx.core.fft.ifft#

      -ifft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#
      +ifft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#

      One dimensional inverse discrete Fourier Transform.

      Parameters:
      • a (array) – The input array.

      • -
      • n (int, optional) – Size of the transformed axis. The +

      • n (int, optional) – Size of the transformed axis. The corresponding axis in the input is truncated or padded with zeros to match n. The default value is a.shape[axis].

      • -
      • axis (int, optional) – Axis along which to perform the FFT. The +

      • axis (int, optional) – Axis along which to perform the FFT. The default is -1.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html index 207ccc6af..f04ce539c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html @@ -8,7 +8,7 @@ - mlx.core.fft.ifft2 — MLX 0.18.0 documentation + mlx.core.fft.ifft2 — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.irfft#

      -irfft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#
      +irfft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#

      The inverse of rfft().

      The output has the same shape as the input except along axis in which case it has size n.

      @@ -879,11 +881,11 @@ which case it has size Parameters:
      • a (array) – The input array.

      • -
      • n (int, optional) – Size of the transformed axis. The +

      • n (int, optional) – Size of the transformed axis. The corresponding axis in the input is truncated or padded with zeros to match n // 2 + 1. The default value is a.shape[axis] // 2 + 1.

      • -
      • axis (int, optional) – Axis along which to perform the FFT. The +

      • axis (int, optional) – Axis along which to perform the FFT. The default is -1.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html index c0d5489a0..c016c65cc 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html @@ -8,7 +8,7 @@ - mlx.core.fft.irfft2 — MLX 0.18.0 documentation + mlx.core.fft.irfft2 — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.irfft2#

      -irfft2(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = [-2, -1], stream: Optional[Union[Stream, Device]] = None) array#
      +irfft2(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = [-2, -1], stream: Optional[Union[Stream, Device]] = None) array#

      The inverse of rfft2().

      Note the input is generally complex. The dimensions of the input specified in axes are padded or truncated to match the sizes @@ -881,12 +883,12 @@ and will have size

      Parameters:
      • a (array) – The input array.

      • -
      • s (list(int), optional) – Sizes of the transformed axes. The +

      • s (list(int), optional) – Sizes of the transformed axes. The corresponding axes in the input are truncated or padded with zeros to match the sizes in s except for the last axis which has size s[-1] // 2 + 1. The default value is the sizes of a along axes.

      • -
      • axes (list(int), optional) – Axes along which to perform the FFT. +

      • axes (list(int), optional) – Axes along which to perform the FFT. The default is [-2, -1].

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html index 7b6ba043b..be6d1daf4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html @@ -8,7 +8,7 @@ - mlx.core.fft.irfftn — MLX 0.18.0 documentation + mlx.core.fft.irfftn — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.irfftn#

      -irfftn(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array#
      +irfftn(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array#

      The inverse of rfftn().

      Note the input is generally complex. The dimensions of the input specified in axes are padded or truncated to match the sizes @@ -881,11 +883,11 @@ and will have size

      Parameters:
      • a (array) – The input array.

      • -
      • s (list(int), optional) – Sizes of the transformed axes. The +

      • s (list(int), optional) – Sizes of the transformed axes. The corresponding axes in the input are truncated or padded with zeros to match the sizes in s. The default value is the sizes of a along axes.

      • -
      • axes (list(int), optional) – Axes along which to perform the FFT. +

      • axes (list(int), optional) – Axes along which to perform the FFT. The default is None in which case the FFT is over the last len(s) axes or all axes if s is also None.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html index 733cabe5a..7befc5f70 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html @@ -8,7 +8,7 @@ - mlx.core.fft.rfft — MLX 0.18.0 documentation + mlx.core.fft.rfft — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.rfft#

      -rfft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#
      +rfft(a: array, n: Optional[int] = None, axis: int = -1, stream: Optional[Union[Stream, Device]] = None) array#

      One dimensional discrete Fourier Transform on a real input.

      The output has the same shape as the input except along axis in which case it has size n // 2 + 1.

      @@ -880,10 +882,10 @@ which case it has size
      • a (array) – The input array. If the array is complex it will be silently cast to a real type.

      • -
      • n (int, optional) – Size of the transformed axis. The +

      • n (int, optional) – Size of the transformed axis. The corresponding axis in the input is truncated or padded with zeros to match n. The default value is a.shape[axis].

      • -
      • axis (int, optional) – Axis along which to perform the FFT. The +

      • axis (int, optional) – Axis along which to perform the FFT. The default is -1.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html index fd6b61c44..9db365d09 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html @@ -8,7 +8,7 @@ - mlx.core.fft.rfft2 — MLX 0.18.0 documentation + mlx.core.fft.rfft2 — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.rfft2#

      -rfft2(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = [-2, -1], stream: Optional[Union[Stream, Device]] = None) array#
      +rfft2(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = [-2, -1], stream: Optional[Union[Stream, Device]] = None) array#

      Two dimensional real discrete Fourier Transform.

      The output has the same shape as the input except along the dimensions in axes in which case it has sizes from s. The last axis in axes is @@ -881,11 +883,11 @@ treated as the real axis and will have size

      • a (array) – The input array. If the array is complex it will be silently cast to a real type.

      • -
      • s (list(int), optional) – Sizes of the transformed axes. The +

      • s (list(int), optional) – Sizes of the transformed axes. The corresponding axes in the input are truncated or padded with zeros to match the sizes in s. The default value is the sizes of a along axes.

      • -
      • axes (list(int), optional) – Axes along which to perform the FFT. +

      • axes (list(int), optional) – Axes along which to perform the FFT. The default is [-2, -1].

      diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html index 1d969350c..d9b451a5b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html +++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html @@ -8,7 +8,7 @@ - mlx.core.fft.rfftn — MLX 0.18.0 documentation + mlx.core.fft.rfftn — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.fft.rfftn#

      -rfftn(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array#
      +rfftn(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array#

      n-dimensional real discrete Fourier Transform.

      The output has the same shape as the input except along the dimensions in axes in which case it has sizes from s. The last axis in axes is @@ -881,11 +883,11 @@ treated as the real axis and will have size

      • a (array) – The input array. If the array is complex it will be silently cast to a real type.

      • -
      • s (list(int), optional) – Sizes of the transformed axes. The +

      • s (list(int), optional) – Sizes of the transformed axes. The corresponding axes in the input are truncated or padded with zeros to match the sizes in s. The default value is the sizes of a along axes.

      • -
      • axes (list(int), optional) – Axes along which to perform the FFT. +

      • axes (list(int), optional) – Axes along which to perform the FFT. The default is None in which case the FFT is over the last len(s) axes or all axes if s is also None.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.flatten.html b/docs/build/html/python/_autosummary/mlx.core.flatten.html index fc54b7563..566d88890 100644 --- a/docs/build/html/python/_autosummary/mlx.core.flatten.html +++ b/docs/build/html/python/_autosummary/mlx.core.flatten.html @@ -8,7 +8,7 @@ - mlx.core.flatten — MLX 0.18.0 documentation + mlx.core.flatten — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.flatten#

      -flatten(a: array, /, start_axis: int = 0, end_axis: int = -1, *, stream: None | Stream | Device = None) array#
      +flatten(a: array, /, start_axis: int = 0, end_axis: int = -1, *, stream: None | Stream | Device = None) array#

      Flatten an array.

      The axes flattened will be between start_axis and end_axis, inclusive. Negative axes are supported. After converting negative axis to @@ -881,8 +883,8 @@ positive, axes outside the valid range will be clamped to a valid value,

      Parameters:
      • a (array) – Input array.

      • -
      • start_axis (int, optional) – The first dimension to flatten. Defaults to 0.

      • -
      • end_axis (int, optional) – The last dimension to flatten. Defaults to -1.

      • +
      • start_axis (int, optional) – The first dimension to flatten. Defaults to 0.

      • +
      • end_axis (int, optional) – The last dimension to flatten. Defaults to -1.

      • stream (Stream, optional) – Stream or device. Defaults to None in which case the default stream of the default device is used.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.floor.html b/docs/build/html/python/_autosummary/mlx.core.floor.html index e152060f0..0b6e1da01 100644 --- a/docs/build/html/python/_autosummary/mlx.core.floor.html +++ b/docs/build/html/python/_autosummary/mlx.core.floor.html @@ -8,7 +8,7 @@ - mlx.core.floor — MLX 0.18.0 documentation + mlx.core.floor — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
      @@ -871,15 +873,15 @@ document.write(`

      mlx.core.full#

      -full(shape: int | Sequence[int], vals: scalar | array, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array#
      +full(shape: int | Sequence[int], vals: scalar | array, dtype: Dtype | None = None, *, stream: None | Stream | Device = None) array#

      Construct an array with the given value.

      Constructs an array of size shape filled with vals. If vals is an array it must be broadcastable to the given shape.

      Parameters:
        -
      • shape (int or list(int)) – The shape of the output array.

      • -
      • vals (float or int or array) – Values to fill the array with.

      • +
      • shape (int or list(int)) – The shape of the output array.

      • +
      • vals (float or int or array) – Values to fill the array with.

      • dtype (Dtype, optional) – Data type of the output array. If unspecified the output type is inferred from vals.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.gather_mm.html b/docs/build/html/python/_autosummary/mlx.core.gather_mm.html index 7ef11662b..b8fc47750 100644 --- a/docs/build/html/python/_autosummary/mlx.core.gather_mm.html +++ b/docs/build/html/python/_autosummary/mlx.core.gather_mm.html @@ -8,7 +8,7 @@ - mlx.core.gather_mm — MLX 0.18.0 documentation + mlx.core.gather_mm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.gather_mm#

      -gather_mm(a: array, b: array, /, lhs_indices: array, rhs_indices: array, *, stream: None | Stream | Device = None) array#
      +gather_mm(a: array, b: array, /, lhs_indices: array, rhs_indices: array, *, stream: None | Stream | Device = None) array#

      Matrix multiplication with matrix-level gather.

      Performs a gather of the operands with the given indices followed by a (possibly batched) matrix multiplication of two arrays. This operation diff --git a/docs/build/html/python/_autosummary/mlx.core.gather_qmm.html b/docs/build/html/python/_autosummary/mlx.core.gather_qmm.html index 871df93a5..39126cb9b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.gather_qmm.html +++ b/docs/build/html/python/_autosummary/mlx.core.gather_qmm.html @@ -8,7 +8,7 @@ - mlx.core.gather_qmm — MLX 0.18.0 documentation + mlx.core.gather_qmm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@

    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.gather_qmm#

      -gather_qmm(x: array, w: array, /, scales: array, biases: array, lhs_indices: array | None = None, rhs_indices: array | None = None, transpose: bool = True, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#
      +gather_qmm(x: array, w: array, /, scales: array, biases: array, lhs_indices: array | None = None, rhs_indices: array | None = None, transpose: bool = True, group_size: int = 64, bits: int = 4, *, stream: None | Stream | Device = None) array#

      Perform quantized matrix multiplication with matrix-level gather.

      This operation is the quantized equivalent to gather_mm(). Similar to gather_mm(), the indices lhs_indices and @@ -888,12 +890,12 @@ as w

    • biases (array) – The biases to use per group_size elements of w

    • lhs_indices (array, optional) – Integer indices for x. Default: None.

    • rhs_indices (array, optional) – Integer indices for w. Default: None.

    • -
    • transpose (bool, optional) – Defines whether to multiply with the +

    • transpose (bool, optional) – Defines whether to multiply with the transposed w or not, namely whether we are performing x @ w.T or x @ w. Default: True.

    • -
    • group_size (int, optional) – The size of the group in w that +

    • group_size (int, optional) – The size of the group in w that shares a scale and bias. Default: 64.

    • -
    • bits (int, optional) – The number of bits occupied by each element in +

    • bits (int, optional) – The number of bits occupied by each element in w. Default: 4.

    diff --git a/docs/build/html/python/_autosummary/mlx.core.grad.html b/docs/build/html/python/_autosummary/mlx.core.grad.html index 50b3056b8..30f82aee7 100644 --- a/docs/build/html/python/_autosummary/mlx.core.grad.html +++ b/docs/build/html/python/_autosummary/mlx.core.grad.html @@ -8,7 +8,7 @@ - mlx.core.grad — MLX 0.18.0 documentation + mlx.core.grad — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -425,6 +426,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.grad#

      -grad(fun: Callable, argnums: int | list[int] | None = None, argnames: str | list[str] = []) Callable#
      +grad(fun: Callable, argnums: int | list[int] | None = None, argnames: str | list[str] = []) Callable#

      Returns a function which computes the gradient of fun.

      Parameters:
      @@ -879,12 +881,12 @@ document.write(`
    • fun (Callable) – A function which takes a variable number of array or trees of array and returns a scalar output array.

    • -
    • argnums (int or list(int), optional) – Specify the index (or indices) +

    • argnums (int or list(int), optional) – Specify the index (or indices) of the positional arguments of fun to compute the gradient with respect to. If neither argnums nor argnames are provided argnums defaults to 0 indicating fun’s first argument.

    • -
    • argnames (str or list(str), optional) – Specify keyword arguments of +

    • argnames (str or list(str), optional) – Specify keyword arguments of fun to compute gradients with respect to. It defaults to [] so no gradients for keyword arguments by default.

    diff --git a/docs/build/html/python/_autosummary/mlx.core.greater.html b/docs/build/html/python/_autosummary/mlx.core.greater.html index 62d987b66..270aa8da1 100644 --- a/docs/build/html/python/_autosummary/mlx.core.greater.html +++ b/docs/build/html/python/_autosummary/mlx.core.greater.html @@ -8,7 +8,7 @@ - mlx.core.greater — MLX 0.18.0 documentation + mlx.core.greater — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
  • mlx.core.repeat
  • mlx.core.reshape
  • mlx.core.right_shift
  • +
  • mlx.core.roll
  • mlx.core.round
  • mlx.core.rsqrt
  • mlx.core.save
  • @@ -425,6 +426,7 @@
  • mlx.core.random.truncated_normal
  • mlx.core.random.uniform
  • mlx.core.random.laplace
  • +
  • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.greater#

      -greater(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +greater(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise greater than.

      Strict greater than on two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.greater_equal.html b/docs/build/html/python/_autosummary/mlx.core.greater_equal.html index 79ea135aa..0efba75c3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.greater_equal.html +++ b/docs/build/html/python/_autosummary/mlx.core.greater_equal.html @@ -8,7 +8,7 @@ - mlx.core.greater_equal — MLX 0.18.0 documentation + mlx.core.greater_equal — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.greater_equal#

      -greater_equal(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +greater_equal(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise greater or equal.

      Greater than or equal on two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.hadamard_transform.html b/docs/build/html/python/_autosummary/mlx.core.hadamard_transform.html index c0c863949..7f7e096f0 100644 --- a/docs/build/html/python/_autosummary/mlx.core.hadamard_transform.html +++ b/docs/build/html/python/_autosummary/mlx.core.hadamard_transform.html @@ -8,7 +8,7 @@ - mlx.core.hadamard_transform — MLX 0.18.0 documentation + mlx.core.hadamard_transform — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.hadamard_transform#

      -hadamard_transform(a: array, scale: float | None = None, stream: None | Stream | Device = None) array#
      +hadamard_transform(a: array, scale: float | None = None, stream: None | Stream | Device = None) array#

      Perform the Walsh-Hadamard transform along the final axis.

      Equivalent to:

      from scipy.linalg import hadamard
      @@ -885,7 +887,7 @@ document.write(`
       
      Parameters:
      • a (array) – Input array or scalar.

      • -
      • scale (float) – Scale the output by this factor. +

      • scale (float) – Scale the output by this factor. Defaults to 1/sqrt(a.shape[-1]) so that the Hadamard matrix is orthonormal.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.identity.html b/docs/build/html/python/_autosummary/mlx.core.identity.html index 94dcafc90..641a7dda0 100644 --- a/docs/build/html/python/_autosummary/mlx.core.identity.html +++ b/docs/build/html/python/_autosummary/mlx.core.identity.html @@ -8,7 +8,7 @@ - mlx.core.identity — MLX 0.18.0 documentation + mlx.core.identity — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home +
      @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,12 +873,12 @@ document.write(`

      mlx.core.identity#

      -identity(n: int, dtype: Dtype | None = float32, *, stream: None | Stream | Device = None) array#
      +identity(n: int, dtype: Dtype | None = float32, *, stream: None | Stream | Device = None) array#

      Create a square identity matrix.

      Parameters:
        -
      • n (int) – The number of rows and columns in the output.

      • +
      • n (int) – The number of rows and columns in the output.

      • dtype (Dtype, optional) – Data type of the output array. Defaults to float32.

      • stream (Stream, optional) – Stream or device. Defaults to None.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.inner.html b/docs/build/html/python/_autosummary/mlx.core.inner.html index b672ccbe1..12d56dca4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.inner.html +++ b/docs/build/html/python/_autosummary/mlx.core.inner.html @@ -8,7 +8,7 @@ - mlx.core.inner — MLX 0.18.0 documentation + mlx.core.inner — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.isclose#

      -isclose(a: array, b: array, /, rtol: float = 1e-05, atol: float = 1e-08, *, equal_nan: bool = False, stream: None | Stream | Device = None) array#
      +isclose(a: array, b: array, /, rtol: float = 1e-05, atol: float = 1e-08, *, equal_nan: bool = False, stream: None | Stream | Device = None) array#

      Returns a boolean array where two arrays are element-wise equal within a tolerance.

      Infinite values are considered equal if they have the same sign, NaN values are not equal unless equal_nan is True.

      @@ -886,9 +888,9 @@ broadcasting.

      • a (array) – Input array.

      • b (array) – Input array.

      • -
      • rtol (float) – Relative tolerance.

      • -
      • atol (float) – Absolute tolerance.

      • -
      • equal_nan (bool) – If True, NaNs are considered equal. +

      • rtol (float) – Relative tolerance.

      • +
      • atol (float) – Absolute tolerance.

      • +
      • equal_nan (bool) – If True, NaNs are considered equal. Defaults to False.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.isfinite.html b/docs/build/html/python/_autosummary/mlx.core.isfinite.html index a6ab2eeaf..a010baa05 100644 --- a/docs/build/html/python/_autosummary/mlx.core.isfinite.html +++ b/docs/build/html/python/_autosummary/mlx.core.isfinite.html @@ -8,7 +8,7 @@ - mlx.core.isfinite — MLX 0.18.0 documentation + mlx.core.isfinite — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.jvp#

      -jvp(fun: Callable, primals: list[array], tangents: list[array]) tuple[list[array], list[array]]#
      +jvp(fun: Callable, primals: list[array], tangents: list[array]) tuple[list[array], list[array]]#

      Compute the Jacobian-vector product.

      This computes the product of the Jacobian of a function fun evaluated at primals with the tangents.

      @@ -880,9 +882,9 @@ at primals
      • fun (Callable) – A function which takes a variable number of array and returns a single array or list of array.

      • -
      • primals (list(array)) – A list of array at which to +

      • primals (list(array)) – A list of array at which to evaluate the Jacobian.

      • -
      • tangents (list(array)) – A list of array which are the +

      • tangents (list(array)) – A list of array which are the “vector” in the Jacobian-vector product. The tangents should be the same in number, shape, and type as the inputs of fun (i.e. the primals).

      @@ -892,7 +894,7 @@ same in number, shape, and type as the inputs of fun.

      Return type:
      -

      list(array)

      +

      list(array)

      diff --git a/docs/build/html/python/_autosummary/mlx.core.left_shift.html b/docs/build/html/python/_autosummary/mlx.core.left_shift.html index 0d8f5d678..8e43b1c65 100644 --- a/docs/build/html/python/_autosummary/mlx.core.left_shift.html +++ b/docs/build/html/python/_autosummary/mlx.core.left_shift.html @@ -8,7 +8,7 @@ - mlx.core.left_shift — MLX 0.18.0 documentation + mlx.core.left_shift — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.left_shift#

      -left_shift(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +left_shift(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise left shift.

      Shift the bits of the first input to the left by the second using numpy-style broadcasting semantics. Either or both input arrays can diff --git a/docs/build/html/python/_autosummary/mlx.core.less.html b/docs/build/html/python/_autosummary/mlx.core.less.html index 79f405ced..4f2ab6ff4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.less.html +++ b/docs/build/html/python/_autosummary/mlx.core.less.html @@ -8,7 +8,7 @@ - mlx.core.less — MLX 0.18.0 documentation + mlx.core.less — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@

    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.less#

      -less(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +less(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise less than.

      Strict less than on two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.less_equal.html b/docs/build/html/python/_autosummary/mlx.core.less_equal.html index f8231dcf7..356973488 100644 --- a/docs/build/html/python/_autosummary/mlx.core.less_equal.html +++ b/docs/build/html/python/_autosummary/mlx.core.less_equal.html @@ -8,7 +8,7 @@ - mlx.core.less_equal — MLX 0.18.0 documentation + mlx.core.less_equal — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.less_equal#

      -less_equal(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#
      +less_equal(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

      Element-wise less than or equal.

      Less than or equal on two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

      diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky.html b/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky.html index 168d94844..263fd99d8 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky.html @@ -8,7 +8,7 @@ - mlx.core.linalg.cholesky — MLX 0.18.0 documentation + mlx.core.linalg.cholesky — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
    • mlx.core.repeat
    • mlx.core.reshape
    • mlx.core.right_shift
    • +
    • mlx.core.roll
    • mlx.core.round
    • mlx.core.rsqrt
    • mlx.core.save
    • @@ -425,6 +426,7 @@
    • mlx.core.random.truncated_normal
    • mlx.core.random.uniform
    • mlx.core.random.laplace
    • +
    • mlx.core.random.permutation
  • Transforms
      @@ -871,7 +873,7 @@ document.write(`

      mlx.core.linalg.cholesky#

      -cholesky(a: array, upper: bool = False, *, stream: None | Stream | Device = None) array#
      +cholesky(a: array, upper: bool = False, *, stream: None | Stream | Device = None) array#

      Compute the Cholesky decomposition of a real symmetric positive semi-definite matrix.

      This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the Cholesky decomposition is computed for each matrix @@ -881,7 +883,7 @@ in the last two dimensions of Parameters:

      • a (array) – Input array.

      • -
      • upper (bool, optional) – If True, return the upper triangular Cholesky factor. +

      • upper (bool, optional) – If True, return the upper triangular Cholesky factor. If False, return the lower triangular Cholesky factor. Default: False.

      • stream (Stream, optional) – Stream or device. Defaults to None in which case the default stream of the default device is used.

      • diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky_inv.html b/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky_inv.html index 539dec0c5..70347cbc2 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky_inv.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.cholesky_inv.html @@ -8,7 +8,7 @@ - mlx.core.linalg.cholesky_inv — MLX 0.18.0 documentation + mlx.core.linalg.cholesky_inv — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -371,6 +371,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -426,6 +427,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -872,7 +874,7 @@ document.write(`

        mlx.core.linalg.cholesky_inv#

        -cholesky_inv(L: array, upper: bool = False, *, stream: None | Stream | Device = None) array#
        +cholesky_inv(L: array, upper: bool = False, *, stream: None | Stream | Device = None) array#

        Compute the inverse of a real symmetric positive semi-definite matrix using it’s Cholesky decomposition.

        Let \(\mathbf{A}\) be a real symmetric positive semi-definite matrix and \(\mathbf{L}\) its Cholesky decomposition such that:

        @@ -888,7 +890,7 @@ in the last two dimensions of \(\math
        Parameters:
        • L (array) – Input array.

        • -
        • upper (bool, optional) – If True, return the upper triangular Cholesky factor. +

        • upper (bool, optional) – If True, return the upper triangular Cholesky factor. If False, return the lower triangular Cholesky factor. Default: False.

        • stream (Stream, optional) – Stream or device. Defaults to None in which case the default stream of the default device is used.

        • diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.cross.html b/docs/build/html/python/_autosummary/mlx.core.linalg.cross.html index e5d93f981..f7320129d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.cross.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.cross.html @@ -8,7 +8,7 @@ - mlx.core.linalg.cross — MLX 0.18.0 documentation + mlx.core.linalg.cross — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.linalg.cross#

          -cross(a: array, b: array, axis: int = -1, *, stream: None | Stream | Device = None) array#
          +cross(a: array, b: array, axis: int = -1, *, stream: None | Stream | Device = None) array#

          Compute the cross product of two arrays along a specified axis.

          The cross product is defined for arrays with size 2 or 3 in the specified axis. If the size is 2 then the third value is assumed @@ -881,7 +883,7 @@ to be zero.

          • a (array) – Input array.

          • b (array) – Input array.

          • -
          • axis (int, optional) – Axis along which to compute the cross +

          • axis (int, optional) – Axis along which to compute the cross product. Default: -1.

          • stream (Stream, optional) – Stream or device. Defaults to None in which case the default stream of the default device is used.

          • diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.inv.html b/docs/build/html/python/_autosummary/mlx.core.linalg.inv.html index cd3a365fa..2118f00df 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.inv.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.inv.html @@ -8,7 +8,7 @@ - mlx.core.linalg.inv — MLX 0.18.0 documentation + mlx.core.linalg.inv — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
          • mlx.core.repeat
          • mlx.core.reshape
          • mlx.core.right_shift
          • +
          • mlx.core.roll
          • mlx.core.round
          • mlx.core.rsqrt
          • mlx.core.save
          • @@ -425,6 +426,7 @@
          • mlx.core.random.truncated_normal
          • mlx.core.random.uniform
          • mlx.core.random.laplace
          • +
          • mlx.core.random.permutation
        • Transforms
            @@ -871,7 +873,7 @@ document.write(`

            mlx.core.linalg.inv#

            -inv(a: array, *, stream: None | Stream | Device = None) array#
            +inv(a: array, *, stream: None | Stream | Device = None) array#

            Compute the inverse of a square matrix.

            This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the inverse is computed for each matrix diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html b/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html index 9024683e5..834e4bb6b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html @@ -8,7 +8,7 @@ - mlx.core.linalg.norm — MLX 0.18.0 documentation + mlx.core.linalg.norm — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -371,6 +371,7 @@

          • mlx.core.repeat
          • mlx.core.reshape
          • mlx.core.right_shift
          • +
          • mlx.core.roll
          • mlx.core.round
          • mlx.core.rsqrt
          • mlx.core.save
          • @@ -426,6 +427,7 @@
          • mlx.core.random.truncated_normal
          • mlx.core.random.uniform
          • mlx.core.random.laplace
          • +
          • mlx.core.random.permutation
        • Transforms
            @@ -872,7 +874,7 @@ document.write(`

            mlx.core.linalg.norm#

            -norm(a: array, /, ord: None | int | float | str = None, axis: None | int | list[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#
            +norm(a: array, /, ord: None | int | float | str = None, axis: None | int | list[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

            Matrix or vector norm.

            This function computes vector or matrix norms depending on the value of the ord and axis parameters.

            @@ -882,16 +884,16 @@ the ord

            a (array) – Input array. If axis is None, a must be 1-D or 2-D, unless ord is None. If both axis and ord are None, the 2-norm of a.flatten will be returned.

            -
          • ord (int, float or str, optional) – Order of the norm (see table under Notes). +

          • ord (int, float or str, optional) – Order of the norm (see table under Notes). If None, the 2-norm (or Frobenius norm for matrices) will be computed along the given axis. Default: None.

          • -
          • axis (int or list(int), optional) – If axis is an integer, it specifies the +

          • axis (int or list(int), optional) – If axis is an integer, it specifies the axis of a along which to compute the vector norms. If axis is a 2-tuple, it specifies the axes that hold 2-D matrices, and the matrix norms of these matrices are computed. If axis is None then either a vector norm (when a is 1-D) or a matrix norm (when a is 2-D) is returned. Default: None.

          • -
          • keepdims (bool, optional) – If True, the axes which are normed over are +

          • keepdims (bool, optional) – If True, the axes which are normed over are left in the result as dimensions with size one. Default False.

        • diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.qr.html b/docs/build/html/python/_autosummary/mlx.core.linalg.qr.html index 773c7ff55..1f382f309 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.qr.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.qr.html @@ -8,7 +8,7 @@ - mlx.core.linalg.qr — MLX 0.18.0 documentation + mlx.core.linalg.qr — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.linalg.qr#

          -qr(a: array, *, stream: None | Stream | Device = None)#
          +qr(a: array, *, stream: None | Stream | Device = None)#

          The QR factorization of the input matrix.

          This function supports arrays with at least 2 dimensions. The matrices which are factorized are assumed to be in the last two dimensions of @@ -888,7 +890,7 @@ in which case the default stream of the default device is used.

          The Q and R matrices.

          Return type:
          -

          tuple(array, array)

          +

          tuple(array, array)

          Example

          diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.svd.html b/docs/build/html/python/_autosummary/mlx.core.linalg.svd.html index c3f45c964..f7ee98201 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.svd.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.svd.html @@ -8,7 +8,7 @@ - mlx.core.linalg.svd — MLX 0.18.0 documentation + mlx.core.linalg.svd — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
        • mlx.core.repeat
        • mlx.core.reshape
        • mlx.core.right_shift
        • +
        • mlx.core.roll
        • mlx.core.round
        • mlx.core.rsqrt
        • mlx.core.save
        • @@ -425,6 +426,7 @@
        • mlx.core.random.truncated_normal
        • mlx.core.random.uniform
        • mlx.core.random.laplace
        • +
        • mlx.core.random.permutation
      • Transforms
          @@ -871,7 +873,7 @@ document.write(`

          mlx.core.linalg.svd#

          -svd(a: array, *, stream: None | Stream | Device = None)#
          +svd(a: array, *, stream: None | Stream | Device = None)#

          The Singular Value Decomposition (SVD) of the input matrix.

          This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the function iterates over all indices of the first @@ -889,7 +891,7 @@ in which case the default stream of the default device is used.

          A = U @ diag(S) @ Vt

          Return type:
          -

          tuple(array, array, array)

          +

          tuple(array, array, array)

      • diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.tri_inv.html b/docs/build/html/python/_autosummary/mlx.core.linalg.tri_inv.html index 44f8687d5..3de2d671d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linalg.tri_inv.html +++ b/docs/build/html/python/_autosummary/mlx.core.linalg.tri_inv.html @@ -8,7 +8,7 @@ - mlx.core.linalg.tri_inv — MLX 0.18.0 documentation + mlx.core.linalg.tri_inv — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,7 +873,7 @@ document.write(`

        mlx.core.linalg.tri_inv#

        -tri_inv(a: array, upper: bool = False, *, stream: None | Stream | Device = None) array#
        +tri_inv(a: array, upper: bool = False, *, stream: None | Stream | Device = None) array#

        Compute the inverse of a triangular square matrix.

        This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the inverse is computed for each matrix diff --git a/docs/build/html/python/_autosummary/mlx.core.linspace.html b/docs/build/html/python/_autosummary/mlx.core.linspace.html index 2965bd13d..cba457235 100644 --- a/docs/build/html/python/_autosummary/mlx.core.linspace.html +++ b/docs/build/html/python/_autosummary/mlx.core.linspace.html @@ -8,7 +8,7 @@ - mlx.core.linspace — MLX 0.18.0 documentation + mlx.core.linspace — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@

      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,14 +873,14 @@ document.write(`

        mlx.core.linspace#

        -linspace(start, stop, num: int | None = 50, dtype: Dtype | None = float32, stream: None | Stream | Device = None) array#
        +linspace(start, stop, num: int | None = 50, dtype: Dtype | None = float32, stream: None | Stream | Device = None) array#

        Generate num evenly spaced numbers over interval [start, stop].

        Parameters:
        • start (scalar) – Starting value.

        • stop (scalar) – Stopping value.

        • -
        • num (int, optional) – Number of samples, defaults to 50.

        • +
        • num (int, optional) – Number of samples, defaults to 50.

        • dtype (Dtype, optional) – Specifies the data type of the output, default to float32.

        diff --git a/docs/build/html/python/_autosummary/mlx.core.load.html b/docs/build/html/python/_autosummary/mlx.core.load.html index ff5b3b2f7..6702c0ad3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.load.html +++ b/docs/build/html/python/_autosummary/mlx.core.load.html @@ -8,7 +8,7 @@ - mlx.core.load — MLX 0.18.0 documentation + mlx.core.load — MLX 0.18.1 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.18.0 documentation - Home - + MLX 0.18.1 documentation - Home + @@ -370,6 +370,7 @@
      • mlx.core.repeat
      • mlx.core.reshape
      • mlx.core.right_shift
      • +
      • mlx.core.roll
      • mlx.core.round
      • mlx.core.rsqrt
      • mlx.core.save
      • @@ -425,6 +426,7 @@
      • mlx.core.random.truncated_normal
      • mlx.core.random.uniform
      • mlx.core.random.laplace
      • +
      • mlx.core.random.permutation
    • Transforms
        @@ -871,18 +873,18 @@ document.write(`

        mlx.core.load#

        -load(file: str, /, format: str | None = None, return_metadata: bool = False, *, stream: None | Stream | Device = None) array | dict[str, array]#
        +load(file: str, /, format: str | None = None, return_metadata: bool = False, *, stream: None | Stream | Device = None) array | dict[str, array]#

        Load array(s) from a binary file.

        The supported formats are .npy, .npz, .safetensors, and .gguf.

        Parameters:
          -
        • file (file, str) – File in which the array is saved.

        • -
        • format (str, optional) – Format of the file. If None, the +

        • file (file, str) – File in which the array is saved.

        • +
        • format (str, optional) – Format of the file. If None, the format is inferred from the file extension. Supported formats: npy, npz, and safetensors. Default: None.

        • -
        • return_metadata (bool, optional) – Load the metadata for formats +

        • return_metadata (bool, optional) – Load the metadata for formats which support matadata. The metadata will be returned as an additional dictionary. Default: False.

        @@ -894,7 +896,7 @@ mapping names to arrays if loading from a