Python | Numpy matrix.swapaxes() (original) (raw)
Introduction
Creating NumPy Array
NumPy Array Manipulation
Matrix in NumPy
- Adding and Subtracting Matrices in Python In this article, we will discuss how to add and subtract elements of the matrix in Python. Example: Suppose we have two matrices A and B. A = [[1,2],[3,4]] B = [[4,5],[6,7]] then we get A+B = [[5,7],[9,11]] A-B = [[-3,-3],[-3,-3]] Now let us try to implement this using Python 1. Adding elements of t 4 min read
- Matrix Multiplication in NumPy Let us see how to compute matrix multiplication with NumPy. We will be using the numpy.dot() method to find the product of 2 matrices. For example, for two matrices A and B. A = [[1, 2], [2, 3]] B = [[4, 5], [6, 7]] So, A.B = [[1*4 + 2*6, 2*4 + 3*6], [1*5 + 2*7, 2*5 + 3*7] So the computed answer wil 2 min read
Operations on NumPy Array
Reshaping NumPy Array
Indexing NumPy Array
Arithmetic operations on NumPyArray
Linear Algebra in NumPy Array