Data Science · Ebook
NumPy: The Foundation of Scientific Python
by Shriira Press
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
- 1Preface
- 2Chapter 1 — What Is NumPy?
- 3Chapter 2 — The ndarray: NumPy's Core Object
- 4Chapter 3 — Creating Arrays
- 5Chapter 4 — Indexing and Slicing
- 6Chapter 5 — Fancy and Boolean Indexing
- 7Chapter 6 — Vectorization and Universal Functions
- 8Chapter 7 — Broadcasting
- 9Chapter 8 — Aggregations, Reductions, and the Axis
- 10Chapter 9 — Reshaping and Combining Arrays
- 11Chapter 10 — Linear Algebra
- 12Chapter 11 — Random Numbers and Statistics
- 13Chapter 12 — Performance, Memory, and the Ecosystem
- 14Chapter 13 — NumPy in Practice and the Profession
- 15Appendix A — Glossary and API Quick Reference
- 16Appendix B — Further Reading and Resources
