You want vstack:

In [45]: a = np.array([[1,2,3]])

In [46]: l = [4,5,6]

In [47]: np.vstack([a,l])
Out[47]: 
array([[1, 2, 3],
       [4, 5, 6]])

You can stack multiple rows on the condition that The arrays must have the same shape along all but the first axis.

In [53]: np.vstack([a,[[4,5,6], [7,8,9]]])
Out[53]: 
array([[1, 2, 3],
       [4, 5, 6],
       [4, 5, 6],
       [7, 8, 9]])
Answer from Padraic Cunningham on Stack Overflow
Discussions

Python - add 1D-array as column of 2D - Stack Overflow
Improving on this answer by removing the unnecessary transposition, you can indeed use reshape(-1, 1) to transform the 1d array you'd like to prepend along axis 1 to the 2d array to a 2d array with a single column. More on stackoverflow.com
🌐 stackoverflow.com
do you guys know how to add append an array in a 2d array?
my_list = [[1, 2, 3, 4, 5]] new_list = my_list * 5 print(new_list) Prints: [[1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5]] But be aware that this only creates multiple labels to the same [1, 2, 3, 4, 5] list object. Mutating any one of the inner lists mutates all of the inner lists as there is only one inner list object: new_list[0][0] += 40 print(new_list) print(my_list) # The original list object Prints: [[41, 2, 3, 4, 5], [41, 2, 3, 4, 5], [41, 2, 3, 4, 5], [41, 2, 3, 4, 5], [41, 2, 3, 4, 5]] [[41, 2, 3, 4, 5]] but you can reassign different objects within new_list: new_list[1] = [7,8,9] print(new_list) Prints: [[41, 2, 3, 4, 5], [7, 8, 9], [41, 2, 3, 4, 5], [41, 2, 3, 4, 5], [41, 2, 3, 4, 5]] If you actually want deep copies of the original inner list, you can use a list comprehension: my_list = [[1, 2, 3, 4, 5]] new_list = [my_list[0][:] for _ in range(5)] new_list[0][0] += 40 print(new_list) Prints: [[41, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5]] More on reddit.com
🌐 r/learnpython
5
5
February 19, 2024
list - Appending to 2 dimensional array in python - Stack Overflow
Use numpy.expand_dims() to have one more axis and append your 2D arrays along that axis. More on stackoverflow.com
🌐 stackoverflow.com
Two dimensional array in python - Stack Overflow
But when I try to do, arr[1].append("bb1"), I get the following error: IndexError: list index out of range. Am I doing anything silly in trying to declare the 2-D array? Edit: but I do not know the number of elements in the array (both rows and columns). ... You do not "declare" arrays or anything else in python... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GeeksforGeeks
geeksforgeeks.org › python › numpy-append-python
numpy.append() in Python - GeeksforGeeks
April 14, 2025 - Appending 1d Array · From the above output we can see that the numpy.append() function does not modify the original arrays (arr1 and arr2). Instead it creates a new array (arr3) with the combined elements.
🌐
Delft Stack
delftstack.com › "delft stack" › "howto" › "python tutorial: how-to guides for everyday python problems" › "how to append 2d array in python"
How to Append 2D Array in Python | Delft Stack
February 22, 2025 - Python’s built-in lists can represent 2D arrays as lists of lists. The simplest way to append values is using the append() method.
🌐
DataCamp
datacamp.com › doc › numpy › append
NumPy append()
NumPy's `append()` function is used to add elements to the end of an existing array, effectively creating a new array with the additional elements.
🌐
Reddit
reddit.com › r/learnpython › do you guys know how to add append an array in a 2d array?
r/learnpython on Reddit: do you guys know how to add append an array in a 2d array?
February 19, 2024 -

say i have array [[1,2,3,4,5]], how can i duplicate it 5 times to [[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]] ?

🌐
Note.nkmk.me
note.nkmk.me › home › python › numpy
NumPy: append() to add values to an array | note.nkmk.me
February 4, 2024 - For example, to add a single row to a two-dimensional array, both arrays must be two-dimensional. Use reshape() to adjust the shape. ... a_2d = np.arange(6).reshape(2, 3) print(a_2d) # [[0 1 2] # [3 4 5]] a_row_1d = np.arange(3) * 10 print(a_row_1d) ...
Find elsewhere
🌐
iO Flood
ioflood.com › blog › numpy-append
Numpy Append Function: From Basics to Advanced Usage
January 31, 2024 - In Numpy, the ‘axis’ parameter refers to the dimension of the array. For a 1D array, there’s only one axis (axis=0). For a 2D array, there are two axes: axis=0 (rows) and axis=1 (columns).
🌐
Kanoki
kanoki.org › 2020 › 01 › 10 › concatenating-arrays-in-numpy
Concatenating arrays in Numpy | kanoki
January 10, 2020 - It Stack arrays in sequence horizontally, So if two 1D arrays are given then it flatten it to a single 1D · a = np.array((1,2,3)) b = np.array((5,6)) np.hstack((a,b)) ... You can concatenate the above 2D arrays using vstack and will get the same result as concatenate with axis =0
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.concatenate.html
numpy.concatenate — NumPy v2.5 Manual
Join a sequence of arrays along an existing axis · New in version 2.0: numpy.concat added as a shorthand for numpy.concatenate
🌐
GeeksforGeeks
geeksforgeeks.org › python › appending-to-2d-list-in-python
Appending to 2D List in Python - GeeksforGeeks
July 23, 2025 - This modifies the contents of the sublist while keeping the 2D structure intact. += operator allows you to extend a sublist with multiple elements in a concise manner. ... This is equivalent to using extend(). If we want to append multiple sublists dynamically list comprehension is a concise option. ... List comprehension generates sublists dynamically and appends them to the original list.
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.append.html
numpy.append — NumPy v2.5 Manual
A copy of arr with values appended to axis. Note that append does not occur in-place: a new array is allocated and filled.
🌐
GeeksforGeeks
geeksforgeeks.org › python › appending-values-at-the-end-of-an-numpy-array
Appending values at the end of an NumPy array - GeeksforGeeks
July 15, 2025 - In this example, two 2D arrays, arr1 and arr2, are vertically stacked using np.concatenate() along the 0th axis, resulting in a combined 2D array. ... # importing the module import numpy as np arr1 = np.array([[1, 2], [3, 4]]) arr2 = np.array([[5, 6]]) combined = np.concatenate((arr1, arr2), axis=0) print(combined) ... In this example, a 1D integer array arr and a 1D float array arr_float are appended together using np.append(), resulting in an upcasted float array as the output.
🌐
Medium
medium.com › @whyamit101 › how-to-append-two-arrays-in-numpy-efa74e5e2788
How to Append Two Arrays in NumPy? | by why amit | Medium
February 26, 2025 - arr1 = np.array([[1, 2], [3, 4]]) arr2 = np.array([[5, 6], [7, 8]]) result = np.append(arr1, arr2) print(result) ... Surprised? You might have expected a 2D output, but since we didn’t specify axis, NumPy flattened everything into a single row.
🌐
TutorialsPoint
tutorialspoint.com › numpy › numpy_append_values_to_an_array.htm
NumPy - Append Values to an Array
axis: The axis along which to concatenate the arrays. 0 is the default for 1D arrays, and other values for multi-dimensional arrays. In the following example, we are concatenating two 2D arrays along axis "0" using the np.concatenate() function −
🌐
Nanyang Technological University
libguides.ntu.edu.sg › python › addelementstoarrays
NP.8 Adding elements to arrays - Python for Basic Data Analysis - LibGuides at Nanyang Technological University
August 26, 2026 - np.append(ndarray, elements you want to add, axis) axis = 0 is row (will be added to the bottom most row) axis = 1 is column (will be added to right most column) 1D arrays (Single) 1D arrays (Multiple) 2D arrays (Rows) 2D arrays (Columns) Let's start with an array called x and add an integer to the end of the array ·
🌐
Centron
centron.de › home › tutorials › how to add elements to an array in python
How To Add Elements to an Array in Python – centron
December 1, 2024 - The preceding example shows how the numpy.append() function works for each axis of the 2D array and how the shape of the resulting array changes. When the axis is 0, the array is appended by row.