BUG: pd.Timedelta np.int, np.float. fixes #8757

closes #8757 
I thought that it was ok to modify the values but not the keys. In any case, I updated to code to look like your suggestion. I'm not sure about the best function location, though.