Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 52)
52.
What does the NumPy function numpy.random.rand(2, 3) do?
Creates a 2x3 array with all elements initialized to zero.
Generates a random array with values between 0 and 1.
Reshapes an existing array to have dimensions 2x3.
Computes the square root of each element in the array.
Answer: Option
Explanation:
The numpy.random.rand() function generates a random array with values between 0 and 1.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.