I switched for `isinstance(self.max_features, (numbers.Integral, np.integer))`. This should solve your issue @larsmans .

(Note that we use  `isinstance(self.max_features, numbers.Integral)` in many other parts of sklearn, without worrying about numpy integers.)