chainerx.ascontiguousarray¶
- chainerx.ascontiguousarray(a, dtype=None, device=None)¶
Returns a C-contiguous array.
- Parameters
a (ndarray) – Source array.
dtype – Data type.
device (Device) – Device on which the array is allocated. If omitted, the default device is chosen.
- Returns
C-contiguous array. A copy will be made only if needed.
- Return type
Warning
If
device
argument is omitted, the new array is created on the default device, not the device of the input array.See also