thebeat
thebeat copied to clipboard
Better type checking using the numbers module
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)
Should be numbers.Real
, to cover float
and not just int
Let's reconsider this once we consider integrating mypy