Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pass 2d array to 1d python

# Create a 2D Numpy Array.
arr = np. array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
# convert 2D array to a 1D array of size 9.
flat_arr = np. reshape(arr, 9)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pass #array #python
ADD COMMENT
Topic
Name
9+7 =