Nils Becker | 10 Dec 10:13 2010
Picon

truth value of dtypes

Hi,

why is

>>> bool(np.dtype(np.float))
False

?

I came across this when using this python idiom:

def f(dtype=None):
....if not dtype:
........print 'using default dtype'

If there is no good reason to have a False truth value, I would vote for
making it True since that is what one would expect (no?)
N.

Gmane