As a bsxfun lover, it's great to see people trying to reproduce the same functionality in other programming languages. Now bsxfun is basically a broadcasting mechanism that also exists in NumPy. In NumPy, this is achieved by creating Singleton sizes with np.newaxis or just None .
Returning to the question in context, a solution based on broadcasting equivalent can be implemented, as shown in the example run -
In [128]: A Out[128]: array([[40, 63, 67, 65, 19], [85, 55, 66, 92, 88], [50, 1, 23, 6, 59], [67, 55, 46, 78, 3]]) In [129]: B Out[129]: array([[78, 63, 45, 34, 81], [ 5, 38, 28, 61, 66], [ 3, 65, 16, 25, 32], [72, 1, 31, 75, 6]]) In [130]: B[A == A.max(axis=1)[:,None]] Out[130]: array([45, 61, 32, 75])