NumPy: numpy.ascontiguousarray() function
numpy.ascontiguousarray() function
The function numpy.ascontiguousarray() is used to get a contiguous array in memory (C order).
Syntax:
numpy.ascontiguousarray(a, dtype=None)

Parameters:
Name | Description | Required / Optional |
---|---|---|
a | Input array. | Required |
dtype | Data-type of returned array. | Optional |
Return value:
out : ndarray - Contiguous array of same shape and content as a, with type dtype if specified.
Example: numpy.ascontiguousarray()
Pictorial Presentation:

Python - NumPy Code Editor:
Previous: asfortranarray()
Next: asarray_chkfinite()
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics