Python Numpy Ravel() Explained for Beginners
Introduction
Numpy Ravel() function is used to flatten a multi-dimensional Numpy array into a 1-D array. While flattening the array, it only returns a view of the original array and not a new copy. In this article, we will explore the syntax and various use cases of the np.ravel() function, with detailed examples to explain its functionality.
Syntax
The syntax for Ravel flatten() is as below :
numpy.ravel(a, order='C')
Parameters:
- a: This is the input