Open Jellevanderwerff opened 1 year ago
Sometimes input validation is done using e.g. isinstance(input, (int, float, np.float64)) etc. Better change this to use the numbers module, e.g. isinstance(input, Integral)
isinstance(input, (int, float, np.float64))
isinstance(input, Integral)
Should be numbers.Real, to cover float and not just int
numbers.Real
float
int
Let's reconsider this once we consider integrating mypy
Sometimes input validation is done using e.g.
isinstance(input, (int, float, np.float64))
etc. Better change this to use the numbers module, e.g.isinstance(input, Integral)