ENH use the np.int dtype to encode integer classes
FIX workaround doctest failure with old numpy