(input)
return output.reshape(input.shape)
Call a Fortran routine, and preserve input shape
Call a Fortran routine, and preserve input shape
Call a Fortran routine and preserve input shape
def some_function(input):
    """
    Call a Fortran routine, and preserve input shape
    """
    input = np.asarray(input)
    # fortran_module.some_function() only accepts 1-D arrays!
    output = fortran_module.some_function(input.ravel())
    return output.reshape(input.shape)
def some_function ( input ) : input = np . asarray ( input ) # fortran_module.some_function() only accepts 1-D arrays! output = fortran_module . some_function ( input . ravel ( ) ) return output . reshape ( input . shape )