![]() | What about this Python callback:
def myfuncf77(a, xcoor, ycoor, nx, ny): """Vectorized function to be called from extension module.""" x = xcoor[:,NewAxis]; y = ycoor[NewAxis,:] a = myfunc(x, y) |
![]() | a now refers to a new NumPy array; no in-place modification of the input argument |