NumPy: The Foundation of Scientific Python

Shriira Press

Preface

A comprehensive, self-contained guide to NumPy, the library at the very bottom of the Python scientific, data, and machine-learning stack — the one…

Welcome to NumPy: The Foundation of Scientific Python.

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.

This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.

A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.

We hope it serves you well.

— Shriira Press

Contents

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