So I'm trying to learn Numpy and I cannot understand how this block of code is giving the output it is:
arr = array([1,2,3,4,5,6,7,8,9,10])
arr[arr>5]
Output :
array([6,7,8,9,10])
I do know that actually an array of boolean values is returned by arr>5 but I just can't understand how that boolean array when passed to arr[] gives the specified output.
Help Appreciated.