Python NumPy – Complete Guide

NumPy Library stands for Numerical Python Library. In this library a NumPy Array object is homogeneous multidimensional array object. It provides many routines / functions for processing these arrays. It is very useful for fast processing on large scale data. It is up to 50x faster than traditional Python lists. Therefore it is one of the most used library in Python by Data Scientists.

We have created a comprehensive list of tutorials of NumPy Library here,

Chapter 1: Creating NumPy Arrays

  1. Create NumPy Arrays from list, tuple or list of lists
  2. Create NumPy Arrays from a range of evenly spaced numbers using np.arrange().
  3. Create NumPy Array of zeros (0’s) using np.zeros()
  4. Create 1D / 2D NumPy Array filled with ones (1’s) using np.ones()
  5. Create NumPy Array of different shapes & initialize with identical values using numpy.full()
  6. Create NumPy Array with same sized samples over an interval in Python using numpy.linspace()
  7. Create a NumPy Array of bool value.

Chapter 2: Adding Elements in Numpy Array

Chapter 3: Searching in Numpy Arrays

  1. Find the index of value in Numpy Array
  2. Find max value & it’s index in Numpy Array | numpy.amax()
  3. Find unique values in a numpy array with frequency & indices
  4. numpy.where() : Tutorial & Examples | Python
  5. numpy.amin() | Find minimum value in Numpy Array and it’s index

Chapter 4: Get Metadata of Numpy Array

  1. How to get Numpy Array Dimensions using in Python?

Chapter 5: Selecting elements from Numpy Array

  1. Select element or sub array by index from numpy array
  2. Select rows / columns by index from a 2D numpy array
  3. Select elements by conditions from Numpy Array

Chapter 6: Modifying a Numpy Array

  1. How to append elements to a Numpy Array
  2. Delete elements, rows or columns from a Numpy Array.
  3. How to sort a Numpy Array in Python ?
  4. Sorting 2D Numpy Array by column or row in Python
  5. How to Reverse a 1D & 2D numpy array in Python
  6. Append rows or columns to a 2D Numpy Array
  7. numpy.reshape() Tutorial with examples
  8. numpy.flatten() – Tutorial with examples
  9. Numpy: flatten() vs ravel()

Chapter 7: Converting NumPy Array to Other Data Structures

  1. Convert Matrix / 2D Array to 1D Array
  2. Convert a 1D array to a 2D array or Matrix
  3. Convert NumPy array to list in python
  4. Convert 2D NumPy array to list of lists in python

Chapter 8: Numpy Array and File I/O

  1. How to save Numpy Array to a CSV File using numpy.savetxt() in Python

Chapter 9: Verify Contents of Numpy Array

  1. Check if all values in Numpy Array are zero
  2. Check if all values are same in Numpy Array

Chapter 10: Counting Elements in Numpy Array

  1. Count occurrences of a value in NumPy array in Python
  2. Count number of True elements in a NumPy Array in Python
  3. numpy.count_nonzero() – Tutorial with examples

Chapter 11: Advance Topics about Numpy Array

  1. What is a Structured Numpy Array and how to create and sort it in Python?
  2. numpy.zeros() & numpy.ones() | Create a numpy array of zeros or ones

1 thought on “Python NumPy – Complete Guide”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top