Skip to content

Commit a4c30eb

Browse files
ev-brkgryte
andauthored
docs: default_device() can be None
PR-URL: #961 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Jake Vanderplas Reviewed-by: Tim Head
1 parent 18315b9 commit a4c30eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/array_api_stubs/_draft/info.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,13 @@ def default_device() -> device:
8080
Returns
8181
-------
8282
out: device
83-
an object corresponding to the default device.
83+
an object (including ``None``) corresponding to the default device.
8484
8585
Notes
8686
-----
8787
88+
- A conforming array library may return ``None`` if the default device is not predictable due to library specific device placement rules.
89+
8890
.. versionadded: 2023.12
8991
"""
9092

0 commit comments

Comments
 (0)