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
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
    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
  • 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
  • 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
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • Transforms
  • 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