Learn practical skills, build real-world projects, and advance your career

Various ways of joining and splitting NumPy arrays!!

I have listed and demonstrated 5 unique and less known NumPy functions which can be used to join and split the arrays in various ways.

NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.

  • stack(arrays[, axis, out])
  • vstack(tup)
  • hstack(tup)
  • split(ary, indices_or_sections, axis=0)
  • array_split(ary, indices_or_sections, axis=0)

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks.

!pip install jovian --upgrade -q
import jovian
jovian.commit(project='numpy-array-operations')
[jovian] Updating notebook "ankit1821/numpy-array-operations" on https://jovian.ai [jovian] Committed successfully! https://jovian.ai/ankit1821/numpy-array-operations

Let's begin by importing Numpy and listing out the functions covered in this notebook.