Create an array, named my_array1, containing the numbers 1, 4, and 6. Create an array, named my_array2, containing every even number between 0 and 100, using a list comprehension. Take a slice of...



  1. Create an array, named my_array1, containing the numbers 1, 4, and 6.

  2. Create an array, named my_array2, containing every even number between 0 and 100, using a list comprehension.

  3. Take a slice of my_array2 containing the middle 50 numbers, and store this array as my_array3.

  4. Make an array named my_array4 such that my_array3 + my_array4 = np.zeros(my_array3.shape).

  5. Define a function riffle which takes two arrays with n elements (a1 and a2) as an input, and returns an array a3 = [a1[0], a2[0], a1[1], a2[1], ... a1[n-1], a2[n-1]].

Sep 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here