Python Programming - Arrays

Exercise : Arrays - General Questions
  • Arrays - General Questions
96.
How can you calculate the element-wise square root of a NumPy array arr?
np.sqrt(arr)
arr ** 0.5
np.square_root(arr)
np.power(arr, 0.5)
Answer: Option
Explanation:
The np.sqrt() function calculates the element-wise square root of the array.

97.
What is the purpose of the NumPy function numpy.flipud(arr)?
Flip array vertically.
Flip array horizontally.
Rotate array 90 degrees clockwise.
Transpose the array.
Answer: Option
Explanation:
The numpy.flipud() function flips the array vertically.