ENH: use copy to move the masked values into the result

saves a relatively expensive bool -> x cast
MAINT: replace two step errstate change with a direct change