diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-20 19:32:36 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-20 19:32:36 -0600 |
commit | e34c097981ad573c9871f5f52d1e6e5769529dda (patch) | |
tree | cefbcaaf97562972a55b8c893ef06e4ae7e51879 /numpy/_array_api/_array_object.py | |
parent | f20be6ad3239a2e7a611ad42c9b36df7863e9883 (diff) | |
download | numpy-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.py | 2 |
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): |