Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python convert multidimensional array to one dimensional

In [12]: a = np.array([[1,2,3], [4,5,6]])

In [13]: b = a.ravel()

In [14]: b
Out[14]: array([1, 2, 3, 4, 5, 6])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #convert #multidimensional #array #dimensional
ADD COMMENT
Topic
Name
1+8 =