Error messages in validation functions sometimes mention X or y, while this may not be an appropriate name from the user's end. Better not to mention the variable name, even if this means the user needs to follow the traceback. See the messages @dalmia proposed in #8178 (comment). (#8178 instead takes the approach of having the variable name explicitly passed into check_array, which is still possible but a much messier change.)