When I create the numpy.array which has bool type mixed with int
np.array([True,True,100])
Out[656]: array([ 1, 1, 100])
np.array([True,True,100]).dtype
Out[657]: dtype('int32')
It will convert whole array to type int, I guess maybe the int class is higher than bool which makes sense.
And, If I already have a bool type array as below :
#When I assign the value by using the index
b=np.array([True,True,False])
b[2]
Out[659]: False
b[2]=100
b
Out[661]: array([ True, True, True])
It will treat the 100 to be bool True, this is make sense too.
However it confuses me when I consider both of the situations.
Could you please explain this a little bit?