NumPy MCQ
Array Functions: What will the output of the following code be?
Code
import numpy as np
a = np.array( [7, 10, 2, 4, 13, 16])
med = np.percentile(a, 50)
print(med)
Array Creation Functions: What will the output of the following line of code be?
Code
np.full((2,2), 1) == np.ones((2,2))
NumPy arange(): Function What will the output of the following code be?
Code:
import numpy as np
a = np.arange(10)
f = np.vectorize(lambda x: x+1)
f(a)