I\'m trying to implement a numpy function that replaces the max in each row of a 2D array with 1, and all other numbers with zero:
>>> a = np.array(
I prefer using numpy.where like so:
a[np.where(a==np.max(a))] = 1