Creation of matrices and linear operators
In the first part of this chapter, we are going to focus on the effective creation of matrices. We start by recalling some different ways to construct a basic matrix as an ndarray
instance class, including an enumeration of all the special matrices already included in NumPy and SciPy. We proceed to examine the possibilities of constructing complex matrices from basic ones. We review the same concepts within the matrix
instance class. Next, we explore in detail the different ways to input sparse matrices. We finish the section with the construction of linear operators.
Note
We assume familiarity with ndarray
creation in NumPy, as well as data types (dtype), indexing, routines for the combination of two or ...
Get Mastering SciPy 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.