You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/creation_functions.py
+13-9
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
fromtypingimportProtocol
1
2
from ._typesimport (
2
3
List,
3
4
NestedSequence,
@@ -11,15 +12,7 @@
11
12
)
12
13
13
14
14
-
defarange(
15
-
start: Union[int, float],
16
-
/,
17
-
stop: Optional[Union[int, float]] =None,
18
-
step: Union[int, float] =1,
19
-
*,
20
-
dtype: Optional[dtype] =None,
21
-
device: Optional[device] =None,
22
-
) ->array:
15
+
classarange(Protocol):
23
16
"""
24
17
Returns evenly spaced values within the half-open interval ``[start, stop)`` as a one-dimensional array.
25
18
@@ -46,6 +39,17 @@ def arange(
46
39
a one-dimensional array containing evenly spaced values. The length of the output array must be ``ceil((stop-start)/step)`` if ``stop - start`` and ``step`` have the same sign, and length ``0`` otherwise.
0 commit comments