Numpy version is 1.26.4
>>> np.isnan('nan', casting='no')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
>>> np.isinf('+inf', casting='unsafe')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: ufunc 'isinf' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
No matter which casting rule I specify it seems to be using ‘safe’, why?