Remove state return from function example in compile documentation (#2518)

This commit is contained in:
russellizadi 2025-08-20 03:45:05 -04:00 committed by GitHub
parent ac85ddfdb7
commit 512281781c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,7 +225,7 @@ In some cases returning updated state can be pretty inconvenient. Hence,
def fun(x, y):
z = x + y
state.append(z)
return mx.exp(z), state
return mx.exp(z)
fun(mx.array(1.0), mx.array(2.0))
# Prints [array(3, dtype=float32)]