Introduction To Vectors and Matrices Using Python
Introduction To Vectors and Matrices Using Python
And then creating an array requires you to use array() method from
the library:
You can then check the shape of the array using the shape attribute:
Creating a matrix is again very simple, you just have to pass a 2D list to
the array method:
There are 2 ways to transpose a matrix, you can either use the T
attribute or simply use the transpose method:
We can also check for the changed shape of the matrix(2D array):