- cupy.lib.stride_tricks.as_strided(x, shape=None, strides=None)#
Create a view into the array with the given shape and strides.
This function has to be used with extreme care, see notes.
- Return type
reshape an array.
as_stridedcreates a view into the array given the exact strides and shape. This means it manipulates the internal data structure of ndarray and, if done incorrectly, the array elements can point to invalid memory and can corrupt results or crash your program.