# welcome to softhunt.net
# Python program explaining
# numpy.asfortranarray() function
import numpy as np
in_arr = np.arange(16).reshape(4, 4)
print ("Input array :
", in_arr)
# checking if it is fortanarray
print(in_arr.flags['F_CONTIGUOUS'])
out_arr = np.asfortranarray(in_arr, dtype ='float')
print ("output array from input array :
", out_arr)
# checking if it has become fortanarray
print(out_arr.flags['F_CONTIGUOUS'])