| 83 | |
| 84 | template <typename T> |
| 85 | std::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 | |
| 95 | std::vector<int64_t> load_int64_vector(const nd::array& arr) |
| 96 | { |