Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx
/ fun
Method
fun
python/tests/test_vmap.py:581–582 ·
view source on GitHub ↗
(a, idx)
Source
from the content-addressed store, hash-verified
579
idx = mx.zeros((2, 4, 1), mx.int32)
580
581
def
fun(a, idx):
582
return
mx.take_along_axis(a, idx, axis=0)
583
584
out = mx.vmap(fun, in_axes=(0, 1))(a, idx)
585
self.assertEqual(out.shape, (4, 2, 1))
Callers
nothing calls this directly
Calls
1
split
Method · 0.45
Tested by
no test coverage detected