MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / to_tuple

Function to_tuple

imperative/python/src/helper.h:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template <typename T>
48auto to_tuple(
49 const T& x, pybind11::return_value_policy policy =
50 pybind11::return_value_policy::automatic) {
51 auto ret = pybind11::tuple(x.size());
52 for (size_t i = 0; i < x.size(); ++i) {
53 ret[i] = pybind11::cast(x[i], policy);
54 }
55 return ret;
56}
57
58template <typename T>
59auto to_tuple(

Callers 2

init_graph_rtFunction · 0.85
castMethod · 0.85

Calls 2

castFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected