ext/torch/templates.cpp in torch-rb-0.3.5 vs ext/torch/templates.cpp in torch-rb-0.3.6

- old
+ new

@@ -51,5 +51,13 @@ a.push(to_ruby<torch::Tensor>(std::get<1>(x))); a.push(to_ruby<double>(std::get<2>(x))); a.push(to_ruby<int64_t>(std::get<3>(x))); return Object(a); } + +Object wrap(std::vector<torch::Tensor> x) { + Array a; + for (auto& t : x) { + a.push(to_ruby<torch::Tensor>(t)); + } + return Object(a); +}