Use numbers.Number in dtype tests