9

Numeric Computation in Python

Working with numbers is, of course, one of the most common things we do in programming languages. And yet, there are a great many ways that our numeric code can go subtly wrong. For larger scale and more intensive work with numbers, the third-party libraries NumPy and Pandas make a great many tasks easier and faster. Other important numeric libraries also exist, but those two are so widespread in the Python ecosystem as to merit independent discussion. Several such libraries are discussed briefly in the appendix, Topics for Other Books.

While reaching out to “vectorized” or “unboxed” numeric libraries can often be useful,1 we should and do perform much numeric computation in Python itself.

1. Wikipedia’s articles ...

Get Better Python Code: A Guide for Aspiring Experts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.