Skip to Content
NumPy Essentials
book

NumPy Essentials

by Jaidev Deshpande, Leo (Liang-Huan) Chin, Tanmay Dutta, Shane Holloway
April 2016
Beginner content levelBeginner
156 pages
3h 23m
English
Packt Publishing
Content preview from NumPy Essentials

Summary

In this chapter, we covered the basic operations of NumPy and its ufuncs. We took a look at the huge difference between NumPy operations and Python looping. We also took a look at how broadcasting works and what we should avoid. We tried to understand the concept of masking as well.

The best way to use NumPy Arrays is to eliminate loops as much as you can and use ufuncs in NumPy instead. Keep in mind the broadcasting rules and use them with care. Using slicing and indexing with masking makes your code more efficient. Most importantly, have fun while using it.

In the next few chapters, we will cover the core libs of NumPy, including date/time and a file I/O to help you extend your NumPy experience.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SciPy and NumPy

SciPy and NumPy

Eli Bressert
Python Distilled

Python Distilled

David M. Beazley

Publisher Resources

ISBN: 9781784393670Supplemental Content