Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx
/ next
Method
next
python/src/random.cpp:36–40 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
34
}
35
36
mx::array next() {
37
auto out = mx::random::split(nb::cast<mx::array>(state()[0]));
38
state()[0] = out.first;
39
return out.second;
40
}
41
42
nb::list& state() {
43
if (!state_) {
Callers
1
init_random
Function · 0.45
Calls
1
split
Function · 0.50
Tested by
no test coverage detected