use a simpler choice function

avoids dependency on numpy 1.7+