summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_array_object.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-07-20 19:32:36 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-07-20 19:32:36 -0600
commite34c097981ad573c9871f5f52d1e6e5769529dda (patch)
treecefbcaaf97562972a55b8c893ef06e4ae7e51879 /numpy/_array_api/_array_object.py
parentf20be6ad3239a2e7a611ad42c9b36df7863e9883 (diff)
downloadnumpy-e34c097981ad573c9871f5f52d1e6e5769529dda.tar.gz
Always include the dtype in the array API Array repr
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-rw-r--r--numpy/_array_api/_array_object.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py
index 54280ef37..f8bad0b59 100644
--- a/numpy/_array_api/_array_object.py
+++ b/numpy/_array_api/_array_object.py
@@ -81,7 +81,7 @@ class Array:
"""
Performs the operation __repr__.
"""
- return self._array.__repr__().replace('array', 'Array')
+ return f"Array({np.array2string(self._array, separator=', ')}, dtype={self.dtype.name})"
# Helper function to match the type promotion rules in the spec
def _promote_scalar(self, scalar):