GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Tutorials
  • My W3Schools
  • W3Schools app iOS & Android NEW
  • Spaces
  • Get Certified
  • Plus
  • Practice
  • Campus (previously Academy)
  • Logout
  • 
  • 
  • 
  • 
  • Sign in

This view

  • Original page
  • New address

GeezerVison is showing www.w3schools.com — NumPy Tutorial

Menu
Search field
×
See More  
NEW W3Schools app iOS & Android Start the adventure
Sign In
★ +1 Spaces Upgrade Paid Courses Spaces Upgrade Paid Courses
   ❮     
     ❯   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST TOOLS

NumPy Tutorial

NumPy HOME NumPy Intro NumPy Getting Started NumPy Creating Arrays NumPy Array Indexing NumPy Array Slicing NumPy Data Types NumPy Copy vs View NumPy Array Shape NumPy Array Reshape NumPy Array Iterating NumPy Array Join NumPy Array Split NumPy Array Search NumPy Array Sort NumPy Array Filter

NumPy Random

Random Intro Data Distribution Random Permutation Seaborn Module Normal Distribution Binomial Distribution Poisson Distribution Uniform Distribution Logistic Distribution Multinomial Distribution Exponential Distribution Chi Square Distribution Rayleigh Distribution Pareto Distribution Zipf Distribution

NumPy ufunc

ufunc Intro ufunc Create Function ufunc Simple Arithmetic ufunc Rounding Decimals ufunc Logs ufunc Summations ufunc Products ufunc Differences ufunc Finding LCM ufunc Finding GCD ufunc Trigonometric ufunc Hyperbolic ufunc Set Operations

NumPy Cert

NumPy Certificate

Quiz/Exercises

NumPy Editor NumPy Quiz NumPy Exercises NumPy Syllabus NumPy Study Plan

NumPy Tutorial

❮ Home Next ❯

Learn NumPy

NumPy is a Python library.

NumPy is used for working with arrays.

NumPy is short for "Numerical Python".

Learn NumPy now ❯

Become NumPy Certified

Get certified with our NumPy exam, includes a professionally curated study kit to guide you from beginner to exam-ready.

Get Certified ❯
Example of the W3Schools NumPy certificate

Share

Learning by Reading

We have created 43 tutorial pages for you to learn more about NumPy.

Starting with a basic introduction and ends up with creating and plotting random data sets, and working with NumPy functions:

Basic

Introduction
 
Getting Started
 
Creating Arrays
 
Array Indexing
 
Array Slicing
 
Data Types
 
Copy vs View
 
Array Shape
 
Array Reshape
 
Array Iterating
 
Array Join
 
Array Split
 
Array Search
 
Array Sort
 
Array Filter

Random

Random Intro
 
Data Distribution
 
Random Permutation
 
Seaborn Module
 
Normal Dist.
 
Binomial Dist.
 
Poisson Dist.
 
Uniform Dist.
 
Logistic Dist.
 
Multinomial Dist.
 
Exponential Dis.
 
Chi Square Dist.
 
Rayleigh Dist.
 
Pareto Dist.
 
Zipf Dist.

ufunc

ufunc Intro
 
Create Function
 
Simple Arithmetic
 
Rounding Decimals
 
Logs
 
Summations
 
Products
 
Differences
 
Finding LCM
 
Finding GCD
 
Trigonometric
 
Hyperbolic
 
Set Operations


Learning by Examples

In our "Try it Yourself" editor, you can use the NumPy module, and modify the code to see the result.

Example

Create a NumPy array:

import numpy as np

arr = np.array([1, 2, 3, 4, 5])

print(arr)

print(type(arr))
Try it Yourself »

Click on the "Try it Yourself" button to see how it works.


Learning by Exercises

Many chapters in this tutorial end with an exercise where you can check your level of knowledge.

See all NumPy Exercises


Learning by Quiz Test

Test your NumPy skills with a quiz test.

Start NumPy Quiz


❮ Home Next ❯
★ +1
Sign in to track progress
W3Schools Full Access - your next career move

REMOVE ADS

This way to the W3Schools Adventure app
Learn more about Adventure Mode›

Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —
Sign in to track progress

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

PLUS
SPACES
GET CERTIFIED
FOR TEACHERS
PRACTICE
CONTACT US
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
AngularJS Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Get Certified
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
SQL Certificate
Python Certificate
PHP Certificate
jQuery Certificate
Java Certificate
C++ Certificate
C# Certificate
XML Certificate
   
FORUM ABOUT CAMPUS
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.









You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.