MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / PyStream

Method PyStream

python/src/wrap_stream.cpp:25–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class PyStream : public stream::Stream {
24 public:
25 PyStream(py::function iterable_factory)
26 : iterable_factory_(iterable_factory) {
27 py::gil_scoped_acquire gil;
28 next_ = iterable_factory_().attr("__iter__")().attr("__next__");
29 }
30 ~PyStream() {
31 py::gil_scoped_acquire gil;
32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected