Book Image

NumPy: Beginner's Guide

By : Ivan Idris
Book Image

NumPy: Beginner's Guide

By: Ivan Idris

Overview of this book

Table of Contents (21 chapters)
NumPy Beginner's Guide Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
NumPy Functions' References
Index

Universal functions


Universal functions (ufuncs) expect a set of scalars as input and produce a set of scalars as output. They are actually Python objects that encapsulate the behavior of a function. We can typically map ufuncs to their mathematical counterparts such as add, subtract, divide, multiply, and so on. Universal functions are, in general, faster because of their special optimizations and because they run on the native level.