Generation

generate functionThu, 30 Mar 2023

There is a matrix A1 = array([[0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1]]) Multiply the vector vector = [1,2,3,4] by the matrix A1

import numpy as np A1 = np.array([[0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1]]) vector = [1,2,3,4] A1.dot(vector)

Want to kickstart your project?Use the new AI Studio to create your code