Am 18.05.22 um 16:08 schrieb Pablo Martinez Ulloa:
I have been using your C++ Python API, in order to establish a bridge from
C++ to Python. We want to do this, as we have a tactile sensor, which only
has a library developed in C++, but we want to obtain the data in real time
in Python to perform tests with a robotic arm and gripper. The problem we
are facing is with transmitting the data into Python. We are using the
function Py_BuildValue, and it seems to be working, but only for sending
one value at a time, and we want to transmit 54 numbers

The usual way to pass an array of numbers into Python is by means of a Numpy Array. In order to do that, you need to include arrayobject.h and then use PyArray_SimpleNew to create an array of numbers as a Python object which you can return https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_SimpleNew


         Christian
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to