chainerx.ascontiguousarray

chainerx.ascontiguousarray(a, dtype=None, device=None)

Returns a C-contiguous array.

Parameters
Returns

C-contiguous array. A copy will be made only if needed.

Return type

ndarray

Warning

If device argument is omitted, the new array is created on the default device, not the device of the input array.