Answers for "matrix python"

3

numpy matrix in python 3

np.matrix([[1, 2], [3, 4]])

# matrix([[1, 2],
#         [3, 4]])
Posted by: Guest on September-27-2020
0

how to print a matrix in python

import numpy as np
print(np.matrix(A))
Posted by: Guest on March-02-2020
0

matrix python math

>>> x = np.array( ((2,3), (3, 5)) )
>>> y = np.matrix( ((1,2), (5, -1)) )
>>> np.dot(x,y)
matrix([[17,  1],
        [28,  1]])
Posted by: Guest on July-08-2020
0

nxnxn matrix python

import numpy as np
x =  np.arange(2, 11).reshape(3,3)
print(x)
Posted by: Manoj S on February-06-2022

Browse Popular Code Answers by Language