If I use np.concatenate
to join this 1x5 array
array([True , False, False, True , True ])
with this 1x5 array
array([4.753, 1.202, 2.296, 1.668, 3.35 ])
The booleans are changed to integers:
array([[1. , 0. , 0. , 1. , 1. ],
[4.753, 1.202, 2.296, 1.668, 3.35 ]])
Why? how can I concatenate them without affecting the booleans?
Ideally, the output can be a pandas DataFrame
question from:
https://stackoverflow.com/questions/65621390/why-does-numpy-array-of-booleans-change-to-integers-if-concatenated-with-another 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…