NumPy - NumPy Array Manipulation - numpy.ravel - NumPy

Explain the function of numpy.ravel

A one-dimensional array that is flattened is returned by this function and if required, a copy is made.The input array and the returned array have the same type. The parameter of the function is as follows:


Parameter & Description
'C': row major (default. 'F': column major 'A': flatten in column-major order, if a is Fortran contiguous in memory, row-major order otherwise 'K': flatten a in the order the elements occur in the memory


The output appears as:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

NumPy Topics