Chapter 5. Working with Matrices and ufuncs
This chapter covers matrices and universal functions (ufuncs). Matrices are well known in mathematics and have their representation in NumPy as well. Universal functions work on arrays, element-by-element, or on scalars. ufuncs expect a set of scalars as input and produce a set of scalars as output. Universal functions can typically be mapped to mathematical counterparts, such as add, subtract, divide, multiply, and likewise. We will also be introduced to trigonometric, bitwise, and comparison universal functions.
In this chapter, we shall cover the following topics:
Matrix creation
Matrix operations
Basic ufuncs
Trigonometric functions
Bitwise functions
Comparison functions