From f9fa48f3e9296f7c8ea20342e752830cbf374f4d Mon Sep 17 00:00:00 2001 From: IsaacBreen <57783927+IsaacBreen@users.noreply.github.com> Date: Mon, 18 Jul 2022 14:40:28 +0800 Subject: [PATCH] Add `self` param to array object properties --- spec/API_specification/array_api/array_object.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/API_specification/array_api/array_object.py b/spec/API_specification/array_api/array_object.py index bdd335191..94dac2d1d 100644 --- a/spec/API_specification/array_api/array_object.py +++ b/spec/API_specification/array_api/array_object.py @@ -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. @@ -21,7 +21,7 @@ def dtype() -> Dtype: """ @property - def device() -> Device: + def device(self: array) -> Device: """ Hardware device the array data resides on. @@ -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). @@ -45,7 +45,7 @@ def mT() -> array: """ @property - def ndim() -> int: + def ndim(self: array) -> int: """ Number of array dimensions (axes). @@ -56,7 +56,7 @@ def ndim() -> int: """ @property - def shape() -> Tuple[Optional[int], ...]: + def shape(self: array) -> Tuple[Optional[int], ...]: """ Array dimensions. @@ -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. @@ -92,7 +92,7 @@ def size() -> Optional[int]: """ @property - def T() -> array: + def T(self: array) -> array: """ Transpose of the array.