def save_json(data, filename: Union[(str, Path)]):
    with open(filename, 'w') as fid:
        json.dump(data, fid, indent=2, cls=NumpyEncoder)
def save_json(data, filename: Union[(str, Path)]):
    with open(filename, 'w') as fid:
        json.dump(data, fid, indent=2, cls=NumpyEncoder)