MCPcopy Create free account
hub / github.com/activeloopai/deeplake / load_vector

Function load_vector

cpp/deeplake_pg/dl_catalog.cpp:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84template <typename T>
85std::vector<T> load_vector(const nd::array& arr)
86{
87 std::vector<T> out;
88 out.reserve(static_cast<size_t>(arr.volume()));
89 for (int64_t i = 0; i < arr.volume(); ++i) {
90 out.push_back(arr.value<T>(i));
91 }
92 return out;
93}
94
95std::vector<int64_t> load_int64_vector(const nd::array& arr)
96{

Callers

nothing calls this directly

Calls 3

reserveMethod · 0.45
volumeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected