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

Function to_sample

python/src/wrap.cpp:232–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232Sample to_sample(py::dict s) {
233 Sample res;
234 for (auto& el : s) {
235 std::string key = el.first.cast<std::string>();
236 res[key] = to_array(el.second);
237 }
238 return res;
239}
240
241} // namespace pybind
242} // namespace mlx

Callers 3

mlx_data_export_datasetFunction · 0.85
nextMethod · 0.85
init_mlx_data_bufferFunction · 0.85

Calls 1

to_arrayFunction · 0.85

Tested by

no test coverage detected