small masked array performance enhancement

remove unnecessary typecast and seterr operations