I'm editing some Python code containing the line:
arr = (c_double * len(self.static_mapped[0, :]))(*self.static_mapped[0, :])
where field self.static_mapped is created using numpy.zeros and where c_double is imported from ctypes.
Based on the context, I'm assuming this is typecasting from numpy doubles to C-type doubles, but this syntax doesn't appear in any of the Python guides I've consulted, and even my IDE is complaining that "'int' object is not callable".
Am I correct in my interpretation of its meaning? What sequence of function calls is going on under the hood? Is this a well-known code idiom in Python or is there a more standard/straightforward way of accomplishing this?