You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #include "pyarray.h"
-
- namespace pyarr {
-
- std::vector<float> ndarray_to_vector(py::array_t<float> array) {
- py::buffer_info info = array.request();
- float* dataPtr = static_cast<float*>(info.ptr);
- std::vector<float> result(dataPtr, dataPtr + info.size);
- return result;
- }
-
- }
|