adding column to numpy array code example
Example 1: add column to existing numpy array
b = np.insert(a, insert_index, values=a[:,2], axis=1)
Example 2: add a new column to numpy array
import numpy as np
N = 10
a = np.random.rand(N,N)
b = np.zeros((N,N+1))
b[:,:-1] = a
Example 3: how to add numpy arrays
added = a+b #elementwise
added_in_the_end = np.concatenate(a,b) #add at the end of the array
#if you want to add in multiple dimentions check the documentation of np.concatenate