BUG: Fix slicing error revealed by numpy 1.9.0.

Numpy 1.9.0 no longer allows oversize data to be assigned to a
boolean indexed 1-d array by discarding excess elements.

Closes #1050.