numpy.__array_namespace_info__.devices#

方法

__array_namespace_info__.devices()[源码]#

NumPy 支持的设备。

对于 NumPy,此函数始终返回 ['cpu']

返回:
deviceslist of str

NumPy 支持的设备。

示例

>>> info = np.__array_namespace_info__()
>>> info.devices()
['cpu']