Code optimization : numpy.where() usage