Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 64)
64.
How do you reshape a NumPy array arr into a single-dimensional array?
arr.reshape((1, -1))
arr.flatten()
arr.reshape((-1, 1))
arr.ravel()
Answer: Option
Explanation:
The arr.ravel() function flattens the array into a single-dimensional array.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.