diff --git a/array_api_strict/_array_object.py b/array_api_strict/_array_object.py index 0de6b8a..a917441 100644 --- a/array_api_strict/_array_object.py +++ b/array_api_strict/_array_object.py @@ -126,12 +126,6 @@ def __new__(cls, *args, **kwargs): # These functions are not required by the spec, but are implemented for # the sake of usability. - def __str__(self: Array, /) -> str: - """ - Performs the operation __str__. - """ - return self._array.__str__().replace("array", "Array") - def __repr__(self: Array, /) -> str: """ Performs the operation __repr__. @@ -149,6 +143,8 @@ def __repr__(self: Array, /) -> str: mid = np.array2string(self._array, separator=', ', prefix=prefix, suffix=suffix) return prefix + mid + suffix + __str__ = __repr__ + # In the future, _allow_array will be set to False, which will disallow # __array__. This means calling `np.func()` on an array_api_strict array # will give an error. If we don't explicitly disallow it, NumPy defaults