Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Flatten List in Python Using NumPy Reshape

import numpy as np
List = np.array([[2,6,1], [3,9,4], [5,7,8]])
result = List.reshape(-1)
print(result)
Comment

PREVIOUS NEXT
Code Example
Python :: opening files in python 
Python :: concact geodataframe python 
Python :: mkvirtualenv python version 
Python :: python temporary file 
Python :: size of set python 
Python :: python 2.7 get user input 
Python :: sympy 
Python :: install ansible with pip 
Python :: python write into file at position 
Python :: python call function x number of times 
Python :: insert data in sqlite database in python 
Python :: axis labels python 
Python :: pandas df exact equals 
Python :: how to add labels on bar of barchart seaborn 
Python :: get coordinates in xarray 
Python :: mean python 
Python :: Create an array of 10 zeros 
Python :: pandas access multiindex column 
Python :: how to make curl request python 
Python :: python __lt__ magic method 
Python :: Kivy FileChooser 
Python :: repr() in python 
Python :: makemigration django 
Python :: discord.py get user id 
Python :: make gif from images in python 
Python :: django create super user 
Python :: python char at 
Python :: close a file python 
Python :: python tutorial pdf 
Python :: python divide array into n parts 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =