Python numpy.concatenate()

In this tutorial, you will learn about python numpy concatenate function. It is used to join a sequence of numpy arrays on an existing axis.

 

Syntax:

The syntax of python numpy concatenate() function is

 

 

Parameter:

numpy concatenate() function can take three parameters

  • (array1,array2, …): These are the arrays, which we want to join or concatenate
  • axis(optional): It represent the axis along which to concatenate or join arrays, by default axis is 0(axis=0). If axis is equal to None(axis=None), arrays will be fattened before joining.
  • out(optional): It represent to ndarray, if provided, the destination to place the result.

 

Check the examples below to understand

Example #1

Array joining using numpy concatenate() function

 

Example #2

Array joining using axis parameter in concatenate() function

 

Start with Numpy

Python numpy.sort()