def f_b_v2(M):
    arySum = M.sum(0)
    return M / arySum.reshape((1, M.shape[1]))
  1. arySum = M.sum(0)
  2. arySum.reshape((1, M.shape[1]))
  3. return M / arySum.reshape((1, M.shape[1]))

Why This Version is More Concise