Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python NumPy vstack Function Example with 1d array

# Python program explaining
# vstack() function

import numpy as geek

# input array
in_arr1 = geek.array([ 1, 2, 3] )
print ("1st Input array : 
", in_arr1)

in_arr2 = geek.array([ 4, 5, 6] )
print ("2nd Input array : 
", in_arr2)

# Stacking the two arrays vertically
out_arr = geek.vstack((in_arr1, in_arr2))
print ("Output vertically stacked array:
 ", out_arr)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #NumPy #vstack #Function #Example #array
ADD COMMENT
Topic
Name
8+8 =