diff --git a/docs/src/usage/indexing.rst b/docs/src/usage/indexing.rst index 669a38f19..8dc01cfc8 100644 --- a/docs/src/usage/indexing.rst +++ b/docs/src/usage/indexing.rst @@ -186,7 +186,7 @@ Boolean masks follow NumPy semantics: .. code-block:: shell >>> a = mx.arange(1000).reshape(10, 10, 10) - >>> a[mx.random.randn(10, 10) > 0.0] = 0 # valid: mask covers axes 0 and 1 + >>> a[mx.random.normal((10, 10)) > 0.0] = 0 # valid: mask covers axes 0 and 1 The mask of shape ``(10, 10)`` applies to the first two axes, so ``a[mask]`` selects the 1-D slices ``a[i, j, :]`` where ``mask[i, j]`` is ``True``.