numpy.__array_namespace_info__.devices#

方法

__array_namespace_info__.devices()[原始碼]#

The devices supported by NumPy.

For NumPy, this always returns ('cpu',).

回傳值:
deviceslist of str

The devices supported by NumPy.

範例

>>> info = np.__array_namespace_info__()
>>> info.devices()
('cpu',)