How to pass a 2d array from Python to C?
Listing [SciPy.Docs]: C-Types Foreign Function Interface (numpy.ctypeslib) (and [Python.Docs]: ctypes – A foreign function library for Python just in case). This is a exactly like [SO]: C function called from Python via ctypes returns incorrect value (@CristiFati’s answer) (a duplicate), it just happens to also involve NumPy. In other words, you have Undefined Behavior, as … Read more