| 76 | |
| 77 | template <class TDataType> |
| 78 | pybind11::array_t<TDataType> MakeNumpyArray( |
| 79 | TDataType const* pBegin, |
| 80 | TDataType const* pEnd, |
| 81 | const std::vector<std::size_t>& rShape) |
| 82 | { |
| 83 | auto array = AllocateNumpyArray<TDataType>(rShape); |
| 84 | KRATOS_ERROR_IF_NOT(std::distance(pBegin, pEnd) == array.size()) << "Size mismatch."; |
| 85 | std::copy(pBegin, |
| 86 | pEnd, |
| 87 | array.mutable_data()); |
| 88 | return array; |
| 89 | } |
| 90 | |
| 91 | template<class TDataType, class TPybindArrayType> |
| 92 | bool AssignDataImpl( |
nothing calls this directly
no test coverage detected