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. Python Fundamentals

Lesson 37 of 55 · Python

Introduction to NumPy

Duration: 20 minutes

Introduction to NumPy\n\nNumPy provides high‑performance N‑dimensional array objects and a vast collection of mathematical functions. It’s the foundation of most Python scientific libraries.\n\npython\nimport numpy as np\n\na = np.array([1, 2, 3])\nprint('Array:', a)\nprint('Mean:', a.mean())\n\n# 2‑D array (matrix)\nb = np.arange(6).reshape(2, 3)\nprint('2×3 matrix:\n', b)\n\n\nOperations on NumPy arrays are vectorized, meaning they execute C‑level loops under the hood—much faster than native Python loops.\n

Previous: Packaging and DistributionNext: Introduction to Pandas