How to solve this one about NumPy

Viewed 22

Could anyone explain this one to me please?

np.array([True, 1, 2]) + np.array([3, 4, False])

How come the result is:

array([4, 5, 2])
1 Answers

True is converted to 1, False is converted to 0.

Related