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
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to