chainer.backend.get_device_from_array¶
- chainer.backend.get_device_from_array(*arrays)[source]¶
Gets the device from arrays.
The device on which the given array reside is returned.
Note
Unlike
get_array_module()
, this method does not recognizeVariable
objects. If you need to get device from theVariable
instancev
, you need to useget_device_from_array(v.array)
.- Parameters
arrays (array or list of arrays) – Arrays to determine the device. If multiple arrays are given, the device correspoinding to the first array which is not NumPy array is returned.
- Returns
Device instance.
- Return type