Skip to content
Discussion options

You must be logged in to vote

Flatten() is a method used in numpy library. It is used in arrays concept, its function is to convert 2D or 3D arrays into 1D array,
For example lets say, there is an array arr1=[[1,2],[3,4]] which is a 2D array when we use flatten() function, it converts arr1 into a 1D array which will give an output as arr_flattened=[1,2,3,4]

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mssanamateen
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants