diff --git a/inspector.py b/inspector.py index 47023a2..46b34d9 100644 --- a/inspector.py +++ b/inspector.py @@ -128,7 +128,7 @@ def format_type(obj): tn = typename(obj) try: dtype = obj.dtype - except AttributeError: + except Exception: # Exception just in case something besides AttributeError is raised return tn else: return f"{dtype} {tn}" @@ -136,7 +136,7 @@ def format_type(obj): def format_size(obj): try: return obj.shape - except AttributeError: + except Exception: # Exception just in case something besides AttributeError is raised try: return len(obj) except TypeError: