Question: Using Numpy Create Python Scripts to solve the following problems. 2. Create a vector of size 10 and call it a. Now copy it into
Using Numpy Create Python Scripts to solve the following problems.

2. Create a vector of size 10 and call it a. Now copy it into a new vector and call it b, but make the values in b shifted by one index to the right from the values in a. Use 0 to ensure the both have the same length. For example A = [3, 5, 2, 7] B = [0, 3, 5, 2] 3. Create a matrix X, and a mask matrix m, add or multiply x with m (x operation m = new_x) so that only the values below the diagonal appear in the new matrix (new_x). Example: A = [[1 2 31.[4 5 6), (7 8 9]] M = mask = ?? New x = [[0 0 0],[4 0 0], [7 8 0]]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
