I\'d like to check if variable is None or numpy.array. I\'ve implemented check_a function to do this.
check_a
def check_a(a): if not a: prin
If you are trying to do something very similar: a is not None, the same issue comes up. That is, Numpy complains that one must use a.any or a.all.
a is not None
a.any
a.all
A workaround is to do:
if not (a is None): pass
Not too pretty, but it does the job.