A

Admin • 832.27K Points
Coach

Q. What does np.empty() do when creating a new array?

  • (A) Creates an array filled with zeros
  • (B) Creates an uninitialized array of the specified shape
  • (C) Creates an array filled with ones
  • (D) Creates an array with random numbers
  • Correct Answer - Option(B)
  • Views: 11
  • Filed under category Numpy
  • Hashtags:

Explanation by: Admin

np.empty() allocates space for an array without initializing its values, meaning it may contain arbitrary data.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.