Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions spec/API_specification/array_api/array_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Union, Any, PyCapsule, Enum, ellipsis)

class _array():
def __init__(self) -> None:
def __init__(self: array) -> None:
"""
Initialize the attributes for the array object class.
"""

@property
def dtype() -> Dtype:
def dtype(self: array) -> Dtype:
"""
Data type of the array elements.

Expand All @@ -21,7 +21,7 @@ def dtype() -> Dtype:
"""

@property
def device() -> Device:
def device(self: array) -> Device:
"""
Hardware device the array data resides on.

Expand All @@ -32,7 +32,7 @@ def device() -> Device:
"""

@property
def mT() -> array:
def mT(self: array) -> array:
"""
Transpose of a matrix (or a stack of matrices).

Expand All @@ -45,7 +45,7 @@ def mT() -> array:
"""

@property
def ndim() -> int:
def ndim(self: array) -> int:
"""
Number of array dimensions (axes).

Expand All @@ -56,7 +56,7 @@ def ndim() -> int:
"""

@property
def shape() -> Tuple[Optional[int], ...]:
def shape(self: array) -> Tuple[Optional[int], ...]:
"""
Array dimensions.

Expand All @@ -74,7 +74,7 @@ def shape() -> Tuple[Optional[int], ...]:
"""

@property
def size() -> Optional[int]:
def size(self: array) -> Optional[int]:
"""
Number of elements in an array.

Expand All @@ -92,7 +92,7 @@ def size() -> Optional[int]:
"""

@property
def T() -> array:
def T(self: array) -> array:
"""
Transpose of the array.

Expand Down