NumPy MCQ Test: NumPy MCQs - Practice Questions
1. How can you flatten a NumPy array?
2. How can you perform element-wise exponentiation in NumPy?
3. What is the purpose of the `np.median` function in NumPy?
4. How can you create a NumPy array from a Python list?
5. What is the role of the `np.mean` function in NumPy?
6. Examine the purpose of the `np.savez` function in NumPy.
7. How can you concatenate two NumPy arrays vertically?
8. How can you perform element-wise subtraction of two NumPy arrays?
9. What does the NumPy function 'np.percentile()' calculate?
10. How can you perform element-wise comparison between two NumPy arrays `arr1` and `arr2`?
11. What is NumPy used for in Python?
12. How can you perform element-wise addition of two NumPy arrays `arr1` and `arr2`?
13. How do you concatenate two NumPy arrays vertically?
14. What does the function `np.arange(5)` do?
15. How can you create a diagonal matrix from a NumPy array?
16. What is the purpose of the `np.eye` function in NumPy?
17. What is the purpose of the NumPy function 'np.histogram()'?
18. What is the difference between `np.concatenate` and `np.stack` in NumPy?
19. What is the purpose of the `np.concatenate` function in NumPy?
20. Examine the purpose of the `np.interp` function in NumPy.
21. What is the purpose of the `np.save` and `np.load` functions in NumPy?
22. What does the NumPy function 'np.unique()' return?
23. Explain the concept of NumPy broadcasting and provide an example.
24. What is the purpose of the NumPy function 'np.linalg.inv()'?
25. In NumPy, what does the 'np.pad()' function do?
26. Examine the role of universal functions (ufuncs) in NumPy and provide an example.
27. In NumPy, what does the 'np.concatenate()' function do?
28. What does the NumPy function 'np.interp()' do?
29. In NumPy, what does the 'np.where()' function do?
30. How can you calculate the standard deviation of a NumPy array?