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
Make the Sphinx build error on warnings and fix all warnings (#390)
* Enable nitpicky mode in the Sphinx build
This will make Sphinx warn when there are cross-references that it cannot find
Without it, it just silently makes the text not link to anything.
* Make warnings errors in the Sphinx build
There are several warnings that need to be fixed, but they are all legitimate
errors in the markup that should be fixed.
* Remove duplicated text
* Fix all Sphinx errors from nitpicky mode
A lot of errors come from autodoc wanting to make cross references for every
return type hint. This is disabled manually using the nitpick_ignore variable
in conf.py for each instance.
Copy file name to clipboardExpand all lines: spec/API_specification/signatures/array_object.py
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,16 @@
1
-
from ._typesimportarray, dtype, Optional, Tuple, Union, Any, PyCapsule, Enum, ellipsis
2
-
from ._typesimportdeviceasDevice
1
+
from __future__ importannotations
3
2
4
-
classarray():
3
+
from ._typesimport (array, dtypeasDtype, deviceasDevice, Optional, Tuple,
4
+
Union, Any, PyCapsule, Enum, ellipsis)
5
+
6
+
class_array():
5
7
def__init__(self) ->None:
6
8
"""
7
9
Initialize the attributes for the array object class.
8
10
"""
9
11
10
12
@property
11
-
defdtype() ->dtype:
13
+
defdtype() ->Dtype:
12
14
"""
13
15
Data type of the array elements.
14
16
@@ -99,7 +101,7 @@ def T() -> array:
99
101
Returns
100
102
-------
101
103
out: array
102
-
two-dimensional array whose first and last dimensions (axes) are permuted in reverse order relative to original array. The returned array must have the same data type as the original array.two-dimensional array whose first and last dimensions (axes) are permuted in reverse order relative to original array. The returned array must have the same data type as the original array.
104
+
two-dimensional array whose first and last dimensions (axes) are permuted in reverse order relative to original array. The returned array must have the same data type as the original array.
If ``stream`` is given, the copy operation should be enqueued on the provided ``stream``; otherwise, the copy operation should be enqueued on the default stream/queue. Whether the copy is performed synchronously or asynchronously is implementation-dependent. Accordingly, if synchronization is required to guarantee data safety, this must be clearly explained in a conforming library's documentation.
0 commit comments