Question 1 Explore the relevant Numpy function. Create the following pattern without hardcoding (i.e. you couldn't creat
Posted: Sat May 14, 2022 7:09 pm
what steps required to do this on python?
Question 1 Explore the relevant Numpy function. Create the following pattern without hardcoding (i.e. you couldn't create the new array and manually get the desired output). Use only numpy functions to get the desired output and also explain your coding. The below is the input array a. Input: a = np.array([1,2,3]) Desired output: array([1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3])
Question 1 Explore the relevant Numpy function. Create the following pattern without hardcoding (i.e. you couldn't create the new array and manually get the desired output). Use only numpy functions to get the desired output and also explain your coding. The below is the input array a. Input: a = np.array([1,2,3]) Desired output: array([1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3])