From 6e36bfce6fae5ce1a0aa2a71eee3d953366ba439 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Fri, 26 Feb 2021 17:37:27 -0700 Subject: Use a different repr form for array_api.ndarray than array --- numpy/_array_api/_array_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/_array_api/_array_object.py') diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index 09f5e5710..99e6147f5 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -47,13 +47,13 @@ class ndarray: """ Performs the operation __str__. """ - return x._array.__str__() + return x._array.__str__().replace('array', 'ndarray') def __repr__(x: array, /) -> str: """ Performs the operation __repr__. """ - return x._array.__repr__() + return x._array.__repr__().replace('array', 'ndarray') # Everything below this is required by the spec. -- cgit v1.2.1