Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add 2 ndarray in python

# Program to concatenate two 2D arrays row-wise
import numpy as np
 
# Creating two 2D arrays
arr1 = np.arange(1, 10).reshape(3, 3)
arr2 = np.arange(10, 19).reshape(3, 3)
 
# Concatenating operation
# axis = 0 implies that it is being done row-wise
np.concatenate((arr1, arr2), axis=0)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #add #ndarray #python
ADD COMMENT
Topic
Name
9+2 =