- 博客(1)
- 收藏
- 关注
原创 Python:将ndarray数据传递给C++
Python numpy库的ndarray数据结构使用很方便,这里记录一下如何将其传递给C/C++代码, 直接上答案: 使用到的库:ctypes C++代码部分(toPython.cpp): #include <stdio.h> extern "C" void showNdarray(int* data, int rows, int cols) { for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++)
2022-03-06 16:05:39
1303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人