Skip to content

Sanity_check_labels returns error when NoneType is in label keys

When a dictionary of parameters is passed to result.plot_corner(), if the dictionary contains a key that does not have a latex label (time_jitter in my case), sanity_check would raise TypeError: argument of type 'NoneType' is not iterable because the latex label is a NoneType.

My current fix is to add a line in get_latex_labels_from_parameter_keys to swap all NoneType to 'None', like this:

latex_labels = ['None' if label is None else label for label in latex_labels]

Edited by Samson Leong