| 211 | namespace array { |
| 212 | |
| 213 | std::shared_ptr<Array> clone(const std::shared_ptr<const Array>& arr) { |
| 214 | auto dst = std::make_shared<Array>(arr->type(), arr->shape()); |
| 215 | std::memcpy(dst->data(), arr->data(), arr->size() * arr->itemsize()); |
| 216 | return dst; |
| 217 | } |
| 218 | |
| 219 | std::shared_ptr<Array> reshape( |
| 220 | const std::shared_ptr<const Array>& arr, |