MCPcopy Create free account
hub / github.com/pybind/pybind11 / get_shape_for_array

Function get_shape_for_array

include/pybind11/eigen/tensor.h:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157template <typename T, int size>
158Eigen::DSizes<T, size> get_shape_for_array(const array &arr) {
159 Eigen::DSizes<T, size> result;
160 const T *shape = arr.shape();
161 for (size_t i = 0; i < size; i++) {
162 result[i] = shape[i];
163 }
164
165 return result;
166}
167
168PYBIND11_WARNING_POP
169

Callers

nothing calls this directly

Calls 1

shapeMethod · 0.45

Tested by

no test coverage detected