From 7086cdfd08e04a22bdb237990e32d54530c98130 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Mon, 23 Jun 2025 12:27:32 +0200 Subject: [PATCH 1/2] DOC: default_device can be None --- src/array_api_stubs/_draft/info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/array_api_stubs/_draft/info.py b/src/array_api_stubs/_draft/info.py index fd3ea9e84..1c15fc3ba 100644 --- a/src/array_api_stubs/_draft/info.py +++ b/src/array_api_stubs/_draft/info.py @@ -80,7 +80,9 @@ def default_device() -> device: Returns ------- out: device - an object corresponding to the default device. + an object corresponding to the default device or ``None``. + A conforming array library may return ``None`` if the default device is not + predictable due to library specific device placement rules. Notes ----- From a633d77a85b8c790bd5199ce25526f9e8aab7fa1 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 13 Nov 2025 01:48:04 -0800 Subject: [PATCH 2/2] docs: update copy --- src/array_api_stubs/_draft/info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/array_api_stubs/_draft/info.py b/src/array_api_stubs/_draft/info.py index 1c15fc3ba..5b064d5a4 100644 --- a/src/array_api_stubs/_draft/info.py +++ b/src/array_api_stubs/_draft/info.py @@ -80,13 +80,13 @@ def default_device() -> device: Returns ------- out: device - an object corresponding to the default device or ``None``. - A conforming array library may return ``None`` if the default device is not - predictable due to library specific device placement rules. + an object (including ``None``) corresponding to the default device. Notes ----- + - A conforming array library may return ``None`` if the default device is not predictable due to library specific device placement rules. + .. versionadded: 2023.12 """