Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx
/ const_func
Method
const_func
python/tests/test_vmap.py:541–542 ·
view source on GitHub ↗
(a, b)
Source
from the content-addressed store, hash-verified
539
b = mx.random.uniform(shape=(4, 3))
540
541
def
const_func(a, b):
542
return
mx.array(2)
543
544
out = mx.vmap(const_func, in_axes=(0, None))(a, b)
545
self.assertTrue(mx.array_equal(mx.full((2,), 2), out))
Callers
nothing calls this directly
Calls
1
array
Method · 0.60
Tested by
no test coverage detected