Added is_bool to utils
@@ -34,6 +34,10 @@ def is_num(arg):
""" is it an int or float? (incl numpy variants)
"""
return isinstance(arg, (bool, np.bool_, int, np.integer, float, np.float64))
+def is_bool(arg):
+ """ is it a boolean (incl numpy variants)
+ """
+ return isinstance(arg, (bool, np.bool_))
def is_pure_list(arg):
""" is it a list or tuple?
"""
