From 3f730e77aa3d14e3d52688b8bd6a24bace500166 Mon Sep 17 00:00:00 2001 From: Umberto Mignozzetti Date: Tue, 16 Sep 2025 14:38:05 -0700 Subject: [PATCH] Update export function example for array input (#2598) After changing the shape to conform (same shapes for all objects), the example works. --- docs/src/usage/export.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/usage/export.rst b/docs/src/usage/export.rst index 4d77b464d..e908b85fc 100644 --- a/docs/src/usage/export.rst +++ b/docs/src/usage/export.rst @@ -164,11 +164,11 @@ to export a function which can be used for inputs with variable shapes: .. code-block:: python - mx.export_function("fun.mlxfn", mx.abs, mx.array(0.0), shapeless=True) + mx.export_function("fun.mlxfn", mx.abs, mx.array([0.0]), shapeless=True) imported_abs = mx.import_function("fun.mlxfn") # Ok - out, = imported_abs(mx.array(-1.0)) + out, = imported_abs(mx.array([-1.0])) # Also ok out, = imported_abs(mx.array([-1.0, -2.0]))