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

Function to_py_sample

python/src/wrap.cpp:224–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224py::dict to_py_sample(const Sample& s) {
225 py::dict res;
226 for (auto& el : s) {
227 res[py::str(el.first)] = to_py_array(el.second);
228 }
229 return res;
230}
231
232Sample to_sample(py::dict s) {
233 Sample res;

Callers 3

mlx_data_export_datasetFunction · 0.85
init_mlx_data_streamFunction · 0.85
nextMethod · 0.85

Calls 1

to_py_arrayFunction · 0.85

Tested by

no test coverage detected