44 Union , Any , PyCapsule , Enum , ellipsis )
55
66class _array ():
7- def __init__ (self ) -> None :
7+ def __init__ (self : array ) -> None :
88 """
99 Initialize the attributes for the array object class.
1010 """
1111
1212 @property
13- def dtype () -> Dtype :
13+ def dtype (self : array ) -> Dtype :
1414 """
1515 Data type of the array elements.
1616
@@ -21,7 +21,7 @@ def dtype() -> Dtype:
2121 """
2222
2323 @property
24- def device () -> Device :
24+ def device (self : array ) -> Device :
2525 """
2626 Hardware device the array data resides on.
2727
@@ -32,7 +32,7 @@ def device() -> Device:
3232 """
3333
3434 @property
35- def mT () -> array :
35+ def mT (self : array ) -> array :
3636 """
3737 Transpose of a matrix (or a stack of matrices).
3838
@@ -45,7 +45,7 @@ def mT() -> array:
4545 """
4646
4747 @property
48- def ndim () -> int :
48+ def ndim (self : array ) -> int :
4949 """
5050 Number of array dimensions (axes).
5151
@@ -56,7 +56,7 @@ def ndim() -> int:
5656 """
5757
5858 @property
59- def shape () -> Tuple [Optional [int ], ...]:
59+ def shape (self : array ) -> Tuple [Optional [int ], ...]:
6060 """
6161 Array dimensions.
6262
@@ -74,7 +74,7 @@ def shape() -> Tuple[Optional[int], ...]:
7474 """
7575
7676 @property
77- def size () -> Optional [int ]:
77+ def size (self : array ) -> Optional [int ]:
7878 """
7979 Number of elements in an array.
8080
@@ -92,7 +92,7 @@ def size() -> Optional[int]:
9292 """
9393
9494 @property
95- def T () -> array :
95+ def T (self : array ) -> array :
9696 """
9797 Transpose of the array.
9898
0 commit comments