Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 76)
76.
Given a NumPy array arr = np.array([[1, 2], [3, 4], [5, 6]]), what does arr.flatten(order='F') do?
Flattens the array in C-style order (row-wise).
Flattens the array in Fortran-style order (column-wise).
Creates a new array by transposing the original array.
Reshapes the array to have a single row.
Answer: Option
Explanation:
The flatten() function with order='F' flattens the array in Fortran-style order.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.