ENH: replace PyUFunc_GetPyValues with faster _get_bufsize_errmask

avoids unnecessary creation of unused error objects.
MAINT: remove unused variable