diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-09-05 09:13:09 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2019-09-05 09:17:14 -0500 |
commit | ee4a4e30cde3894f89b5f3fa7dd74bd23743848f (patch) | |
tree | 3d570127504914f2a605797d0c2895c0581c32da /numpy | |
parent | af76d3b761c4047d314a4bc9a9793577fadcb46e (diff) | |
download | numpy-ee4a4e30cde3894f89b5f3fa7dd74bd23743848f.tar.gz |
ENH: Override module in private error classes displayed as base
While IPython seems to not print the module information (or only
prints qualname), python adds the full module, so it needs to be
overridden to not be printed on error.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/_exceptions.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/_exceptions.py b/numpy/core/_exceptions.py index a1af7a78d..b3805af04 100644 --- a/numpy/core/_exceptions.py +++ b/numpy/core/_exceptions.py @@ -27,6 +27,7 @@ def _display_as_base(cls): assert issubclass(cls, Exception) cls.__name__ = cls.__base__.__name__ cls.__qualname__ = cls.__base__.__qualname__ + set_module(cls.__base__.__module__)(cls) return cls |