In [1]: import numpy as np

In [2]: a = np.array([[1, 2, 3], [4, 5, 6]])

In [3]: b = np.array([[9, 8, 7], [6, 5, 4]])

In [4]: np.concatenate((a, b))
Out[4]: 
array([[1, 2, 3],
       [4, 5, 6],
       [9, 8, 7],
       [6, 5, 4]])

or this:

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

In [2]: b = np.array([4, 5, 6])

In [3]: np.vstack((a, b))
Out[3]: 
array([[1, 2, 3],
       [4, 5, 6]])
Answer from endolith on Stack Overflow
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.append.html
numpy.append — NumPy v2.5 Manual
>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
🌐
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.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-append-two-numpy-arrays
How to append two NumPy Arrays? - GeeksforGeeks
July 23, 2025 - A copy of array with values being appended at the end as per the mentioned object, along a given axis. ... import numpy array1 = numpy.array([1, 2, 3, 4, 5]) array2 = numpy.array([6, 7, 8, 9, 10]) # Appending both arrays using Append method array1 = numpy.append(array1, array2) print(array1)
🌐
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 - If you’ve ever needed to merge two arrays in NumPy, numpy.append() is your go-to method. It helps you extend an existing array by appending another one to it.
🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.append.html
numpy.append — NumPy v2.1 Manual
>>> a = np.array([1, 2], dtype=int) >>> c = np.append(a, []) >>> c array([1., 2.]) >>> c.dtype float64
🌐
NumPy
numpy.org › doc › 2.3 › reference › generated › numpy.append.html
numpy.append — NumPy v2.3 Manual
>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
🌐
Vultr Docs
docs.vultr.com › python › third-party › numpy › append
Python Numpy append() - Add Elements to Array | Vultr Docs
April 10, 2025 - Plan to append elements to this array. ... Use numpy.append() to add a single element or multiple elements.
Find elsewhere
🌐
Centron
centron.de › startseite › numpy.append() in python – tutorial
numpy.append() in Python - Tutorial
February 7, 2025 - The numpy.append() function is a versatile way to concatenate arrays in Python. It offers options for flattening arrays and appending along specific axes.
🌐
iO Flood
ioflood.com › blog › numpy-append
Numpy Append Function: From Basics to Advanced Usage
January 31, 2024 - In this example, we’ve created a Numpy array arr with elements 1, 2, and 3. We then use the ‘numpy.append()’ function to add the elements 4, 5, and 6 to the end of the array, resulting in a new array new_arr that contains all six elements.
🌐
Note.nkmk.me
note.nkmk.me › home › python › numpy
NumPy: append() to add values to an array | note.nkmk.me
February 4, 2024 - NumPy: Join arrays with np.concatenate, block, vstack, hstack, etc. The approach for three-dimensional and higher-dimensional arrays follows the same principle. By default (axis=None), the array is flattened to one dimension before being added to the end. a_3d = np.arange(12).reshape(2, 3, 2) print(a_3d) # [[[ 0 1] # [ 2 3] # [ 4 5]] # # [[ 6 7] # [ 8 9] # [10 11]]] print(np.append(a_3d, 100)) # [ 0 1 2 3 4 5 6 7 8 9 10 11 100]
🌐
TutorialsPoint
tutorialspoint.com › numpy › numpy_append.htm
Numpy Append() Method
import numpy as np a = np.array([[1,2,3],[4,5,6]]) print('First array:') print(a) print('\n') print('Append elements to array:') print(np.append(a, [7,8,9])) print('\n') print('Append elements along axis 0:') print(np.append(a, [[7,8,9]],axis = 0)) print('\n') print('Append elements along axis 1:') print(np.append(a, [[5,5,5],[7,8,9]],axis = 1))
🌐
AskPython
askpython.com › python › array › append-an-array-in-python
How to append an Array in Python? - AskPython
April 19, 2026 - import numpy as np x = np.arange(3) print("Array x : ", x) y = np.arange(10,15) print("\nArray y : ", y) res = np.append(x, y) print("\nResult after appending x and y: ", res)
🌐
w3resource
w3resource.com › numpy › manipulation › append.php
Numpy: numpy.append() function - w3resource
April 25, 2026 - Adding Rows or Columns: Users can add new rows or columns to an existing array, expanding its dimensions as needed. Flexible Usage: The function accepts both single elements and arrays as input for appending, offering versatility in array manipulation. Out-of-Place Operation: numpy.append() performs an out-of-place operation, meaning it creates and returns a new array with appended values without modifying the original array.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › how to append numpy arrays examples
How to Append NumPy Arrays Examples - Spark By {Examples}
March 27, 2024 - numpy.append() is used to append two or multiple arrays at the end of the specified NumPy array. The NumPy append() function is a built-in function
🌐
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.append.html
numpy.append — NumPy v2.2 Manual
>>> a = np.array([1, 2], dtype=int) >>> c = np.append(a, []) >>> c array([1., 2.]) >>> c.dtype float64
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.concatenate.html
numpy.concatenate — NumPy v2.5 Manual
When one or more of the arrays to be concatenated is a MaskedArray, this function will return a MaskedArray object instead of an ndarray, but the input masks are not preserved.