Python Numpy TypeError: ufunc 'isfinite' not supported for the input types Python Numpy TypeError: ufunc 'isfinite' not supported for the input types arrays arrays