27 Jan
2012
27 Jan
'12
9:37 p.m.
This will be indeed very helpful. Thanks.
Well, if you really need to do this in more than one place, define a utility function and call it a day.
def should_not_plot(x): if x is None: return True elif isinstance(x, np.ndarray): return x.size == 0 else: return bool(x)
Bartosz