chainerx.empty_like¶
-
chainerx.
empty_like
(a, device=None)¶ Returns a new array with same shape and dtype of a given array.
- Parameters
a (ndarray) – Prototype array.
device (Device) – Device on which the array is allocated. If omitted, the default device is chosen.
- Returns
New array with same shape and dtype as
a
with elements not initialized.- Return type
Warning
If
device
argument is omitted, the new array is created on the default device, not the device of the prototype array.See also