4
4
Union , Any , PyCapsule , Enum , ellipsis )
5
5
6
6
class _array ():
7
- def __init__ (self ) -> None :
7
+ def __init__ (self : array ) -> None :
8
8
"""
9
9
Initialize the attributes for the array object class.
10
10
"""
11
11
12
12
@property
13
- def dtype () -> Dtype :
13
+ def dtype (self : array ) -> Dtype :
14
14
"""
15
15
Data type of the array elements.
16
16
@@ -21,7 +21,7 @@ def dtype() -> Dtype:
21
21
"""
22
22
23
23
@property
24
- def device () -> Device :
24
+ def device (self : array ) -> Device :
25
25
"""
26
26
Hardware device the array data resides on.
27
27
@@ -32,7 +32,7 @@ def device() -> Device:
32
32
"""
33
33
34
34
@property
35
- def mT () -> array :
35
+ def mT (self : array ) -> array :
36
36
"""
37
37
Transpose of a matrix (or a stack of matrices).
38
38
@@ -45,7 +45,7 @@ def mT() -> array:
45
45
"""
46
46
47
47
@property
48
- def ndim () -> int :
48
+ def ndim (self : array ) -> int :
49
49
"""
50
50
Number of array dimensions (axes).
51
51
@@ -56,7 +56,7 @@ def ndim() -> int:
56
56
"""
57
57
58
58
@property
59
- def shape () -> Tuple [Optional [int ], ...]:
59
+ def shape (self : array ) -> Tuple [Optional [int ], ...]:
60
60
"""
61
61
Array dimensions.
62
62
@@ -74,7 +74,7 @@ def shape() -> Tuple[Optional[int], ...]:
74
74
"""
75
75
76
76
@property
77
- def size () -> Optional [int ]:
77
+ def size (self : array ) -> Optional [int ]:
78
78
"""
79
79
Number of elements in an array.
80
80
@@ -92,7 +92,7 @@ def size() -> Optional[int]:
92
92
"""
93
93
94
94
@property
95
- def T () -> array :
95
+ def T (self : array ) -> array :
96
96
"""
97
97
Transpose of the array.
98
98
0 commit comments