I wrote the following code that does: (1) Generate root matrix of shape (3, 16), and (2) Generate 1000 binary vectors C such that each vector is added at the end of the root matrix iteratively one at a time. 
The code is the following (python 2.7):
# STEP1: Generate root matrix 
root = [random.randint(0, 2 ** 16 - 1) for _ in range(16 - 1)]
root = [('{0:0' + str(16) + 'b}').format(x) for x in root]
root = np.asarray([list(map(int, list(x))) for x in root], dtype=np.uint8)
# STEP2: Generate 1000 binary vectors
C = [random.randint(0, 2 ** 16 - 1) for _ in range(1000)]
C = list(set(C))
C = [('{0:0' + str(16) + 'b}').format(x) for x in C]
C = np.asarray([list(map(int, list(x))) for x in C], dtype=np.uint8)
# Step3: For each vector of C, append it at the end of root matrix
for i in range(1000):
    batch = root[i:(i + (len(root)))]
    batch = np.append(batch, C[i])
    print(batch)
    # Continue to process batch after being extended by adding a new vector
The matrix C looks like this:
[[0 1 1 ..., 0 1 1]
 [1 0 1 ..., 1 0 1]
 [0 1 0 ..., 1 1 0]
 ..., 
 [1 1 0 ..., 1 0 0]
 [0 0 1 ..., 1 1 0]
 [1 1 1 ..., 1 1 1]]
The problem is that np.append(batch, C[i])merges all vectors into a single one but this is not what I want. My goal is to extend the root matrix from (3, 16) to be (4,16) by just adding a vector C[i] iteratively. How can I achieve that?
Thank you
append, I recommend collecting the arrays you want to join in alist, and doing onenp.arrayorconcatenate.np.appendis poorly written and too often confused with list append.