A

Admin • 833.24K Points
Coach

Q. Which NumPy function converts a 1D array into a 2D column vector?

  • (A) reshape(-1, 1)
  • (B) flatten()
  • (C) ravel()
  • (D) expand_dims()
  • Correct Answer - Option(A)
  • Views: 21
  • Filed under category Numpy
  • Hashtags:

Explanation by: Admin

reshape(-1, 1) transforms a 1D array into a 2D column vector.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.