Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Master Data Science with Python

Lesson 6 of 60 · python

Introduction to NumPy

Duration: 15 minutes

Introduction to NumPy

NumPy (Numerical Python) provides the foundational n‑dimensional array object that powers most scientific Python libraries.

Installing NumPy

pip install numpy

First array

import numpy as np

# Create a 1‑D array from a Python list
arr = np.array([1, 2, 3, 4])
print(arr)
print("Shape:", arr.shape)
print("Data type:", arr.dtype)

Why use NumPy?

  • Speed: Vectorized operations are implemented in C.
  • Memory efficiency: Homogeneous data types.
  • Rich functionality: Linear algebra, Fourier transforms, random sampling, and more.

Info

All subsequent data‑science work will rely on NumPy under the hood.

Previous: Version Control with Git & GitHubNext: NumPy Arrays and Data Types