[Numpy-discussion] adding booleans

josef.pktd@gmai... josef.pktd@gmai...
Sat Jun 8 06:40:49 CDT 2013


Question about namespace

why is there bool and bool_ ?

>>> np.bool(True) + np.bool(True)
2
>>> np.bool_(True) + np.bool_(True)
True

>>> type(np.bool(True))
<type 'bool'>
>>> type(np.bool_(True))
<type 'numpy.bool_'>

I didn't pay attention to the trailing underline in Pauli's original example

Josef


More information about the NumPy-Discussion mailing list