| 120 | } |
| 121 | |
| 122 | TensorShape<> shape_from_py(py::tuple tup) { |
| 123 | TensorShape<> shape; |
| 124 | shape.resize(tup.size()); |
| 125 | for (size_t i = 0; i < tup.size(); ++i) { |
| 126 | shape[i] = tup[i].cast<int64_t>(); |
| 127 | } |
| 128 | return shape; |
| 129 | } |
| 130 | |
| 131 | template <int ndim> |
| 132 | py::list as_py_list(const TensorShape<ndim> &shape) { |
no test coverage detected