NumPy: The Foundation of Scientific Python cover

Data Science · Ebook

NumPy: The Foundation of Scientific Python

by Shriira Press

4.7(3,799)91 pagesPublished 2026

A comprehensive, self-contained guide to NumPy, the library at the very bottom of the Python scientific, data, and machine-learning stack — the one almost every other tool is built on. NumPy provides the ndarray, a fast, n-dimensional array, and the vectorized operations to compute on it in compiled code. When pandas holds a column, Matplotlib plots a curve, scikit-learn trains a model, or PyTorch moves a tensor, there is a NumPy array (or its direct descendant) underneath. This book teaches it from first principles: the ndarray and why it's fast, creating and indexing arrays, vectorization, broadcasting, aggregations and the axis concept, reshaping, linear algebra, random numbers, and performance. It blends intuition, the concepts behind the API, and runnable code.

Contents

  1. 1Preface
  2. 2Chapter 1 — What Is NumPy?
  3. 3Chapter 2 — The ndarray: NumPy's Core Object
  4. 4Chapter 3 — Creating Arrays
  5. 5Chapter 4 — Indexing and Slicing
  6. 6Chapter 5 — Fancy and Boolean Indexing
  7. 7Chapter 6 — Vectorization and Universal Functions
  8. 8Chapter 7 — Broadcasting
  9. 9Chapter 8 — Aggregations, Reductions, and the Axis
  10. 10Chapter 9 — Reshaping and Combining Arrays
  11. 11Chapter 10 — Linear Algebra
  12. 12Chapter 11 — Random Numbers and Statistics
  13. 13Chapter 12 — Performance, Memory, and the Ecosystem
  14. 14Chapter 13 — NumPy in Practice and the Profession
  15. 15Appendix A — Glossary and API Quick Reference
  16. 16Appendix B — Further Reading and Resources