Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx
/ f
Method
f
python/tests/test_array.py:493–495 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
491
492
# check that `[mx.array, ...]` retains the `mx.array` in the graph
493
def
f(x):
494
y = mx.array([x, mx.array([2.0])])
495
return
(2 * y).sum()
496
497
x = mx.array([1.0])
498
dfdx = mx.grad(f)
Callers
nothing calls this directly
Calls
1
array
Method · 0.60
Tested by
no test coverage detected