NumPy - Array Manipulation
Which of the following is the correct syntax to convert a 2D NumPy array
arr into a 1D array using ravel()?arr into a 1D array using ravel()?ravel() is a method of a NumPy array, so it is called as arr.ravel().ravel(arr) is incorrect because ravel is not a standalone function in NumPy; arr.flatten() is valid but uses flatten, not ravel; arr.ravel misses parentheses, so it returns a method object, not the result.arr.ravel() -> Option Carr.ravel() [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions