def get_arr_desc(arr):
    """Get array description, in the form '<array type> <array shape>'"""
    type_ = type(arr).__name__  # see also __qualname__
    shape = getattr(arr, 'shape', None)
    if shape is not None:
        desc = '{type_} {shape}'
    else:
        desc = '{type_} <no shape>'
    return desc.format(type_=type_, shape=shape)
Get array description, in the form '<array type> <array shape>