I have the following line in python:
a = (ctypes.c_float*10)()
Here a is initialized as an object with _repr_ result:
<__main__.c_float_Array_10 object at 0x7fbb3e6cf340>
My understanding is that this object is some sort of a pointer that can interoperate between python and C functions. How does this work and how are we able to multiply ctypes.c_float
class with and integer?
What’s the actual question? It’s pretty much covered in [Python.Docs]: ctypes – A foreign function library for Python.
hat does it mean to multiply the c_float class with and integer. I understand the mul dunder function for object but I am not able to understand it in class context.