def fmt(obj): 
    """Value formatter replaces numpy types with base python types."""
    if isinstance(obj, (str, int, float, complex, tuple, list, dict, set)):
        out = obj
    else:                        # else, assume numpy
        try:
            out = obj.item()     # try to get value
        except:
            out = obj.tolist()   # except, must be np iterable; get list
    return(out)