Passing a NumPy array into a Fortran subroutine through f2py. The array is created the usual way, np.zeros((n, m)), so it's C-ordered. Fortran wants the columns contiguous. f2py knows that, and for an ordinary input argument it makes an element-wise copy in the right order without saying anything. No warning. It works, the numbers are right. Every call in the loop just copies the matrix.
intent(inout) is worse but more honest. A copy there would swallow the changes, so f2py demands a properly laid out array and raises an exception otherwise. The cure is order='F' at creation, or one np.asfortranarray call before the loop.
It's the old column-order story, only this time it sits where two languages meet, and the bill is a copy per call.
Annoying. I'd rather have had the warning.