MCPcopy Create free account
hub / github.com/citp/BlockSci / convertRandomSizedPy

Function convertRandomSizedPy

blockscipy/src/python_range_conversion.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77template <typename T>
78py::list convertRandomSizedPy(T && t) {
79 auto rangeSize = static_cast<size_t>(ranges::size(t));
80 pybind11::list list{rangeSize};
81 size_t index = 0;
82 RANGES_FOR(auto && a, t) {
83 list[index] = std::forward<decltype(a)>(a);
84 index++;
85 }
86 return list;
87}
88
89template <typename T>
90py::list convertInputPy(T && t) {

Callers 1

operator()Method · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected