MCPcopy 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_randomFunction · 0.45

Calls 1

splitFunction · 0.50

Tested by

no test coverage detected