[Numpy-discussion] numpy.r_[True, False] is not a boolean array

oc-spam66 oc-spam66@laposte....
Fri Dec 3 05:29:49 CST 2010


I observe the following behavior:

numpy.r_[True, False] 	-> array([1, 0], dtype=int8)
numpy.r_[True]		-> array([ True], dtype=bool)

I would expect the first line to give a boolean array:
array([ True, False], dtype=bool)

Is it normal? Is it a bug?

numpy.__version__ = '1.4.1'

More information about the NumPy-Discussion mailing list