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

Matrices


Matrices in NumPy are subclasses of ndarray. We can create matrices using a special string format. They are, just like in mathematics, two-dimensional (see https://www.khanacademy.org/math/precalculus/precalc-matrices). Matrix multiplication is, as you would expect, different from the normal NumPy multiplication. The same is true for the power operator. We can create matrices with the mat(), matrix(), and bmat() functions.