I am reading about vectorized expressions in cheat sheet. It is mentioned as below
Vectorized expressions
np.where(cond, x, y) is a vectorized version of the expression ‘x if condition else y’
example:
np.where([True, False], [1, 2], [2, 3]) => ndarray (1, 3)
I am not able understand above example. My understanding is that we should have expression but here we have list of [True, False].
Request to explain in break up and how we got output of ndarray(1,3)
Thanks