7#include <stratax/core/dtypes/Concepts.hpp>
8#include <stratax/core/Shape.hpp>
9#include <stratax/exceptions/Exceptions.hpp>
10#include <stratax/containers/Tensor.hpp>
11#include <stratax/containers/Vector.hpp>
13namespace stratax::manipulation {
37 const auto target_size = shape.
elements();
38 if (arr.size() != target_size)
41 "Reshape must preserve the number of elements.");
45 std::copy(arr.begin(), arr.end(), result.begin());
68 std::copy(arr.begin(), arr.end(), result.begin());
Arbitrary-rank owning array of numeric values.
One-dimensional owning array of numeric values.
Stores the dimensions of a multidimensional array.
size_type elements() const
Computes the total number of elements described by the shape.