Why np.inf > 1e999
returns False?
I'm using Python 3.7
The notation 1e999
results in a float -- and this float is larger than the maximum possible value. So 1e999
becomes inf
.
A quick test in Ipython:
In [11]: 1e999 == np.inf
Out[11]: True
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.