-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Unexpected behaviour of np.finfo with None #14684
Copy link
Copy link
Closed
Labels
Description
I am using numpy.iinfo and np.finfo to test whether a given type or value is corresponds to an integer or a float. There is a weird behaviour when dealing with None.
The following fails, as expected:
import numpy as np
np.iinfo(None)
Nevertheless
import numpy as np
np.finfo(None)
does not, as I would expect. Is that a bug?
IMHO when type(None) returns NoneType, then np.finfo should fail as np.iinfo does.
Reactions are currently unavailable