You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c = float('-iNf') #These strings are case-insensitive
2274
+
c = float('-iNf') # 这些字符串不区分大小写
2275
2275
d = float('nan')
2276
2276
```
2277
2277
@@ -2289,7 +2289,7 @@ ValueError: could not convert string to float: some_other_string
2289
2289
True
2290
2290
>>> None == None # None==None
2291
2291
True
2292
-
>>> b == d #but nan!=nan
2292
+
>>> b == d #但是 nan!=nan
2293
2293
False
2294
2294
>>> 50/a
2295
2295
0.0
@@ -2299,9 +2299,9 @@ nan
2299
2299
nan
2300
2300
```
2301
2301
2302
-
#### 💡 Explanation:
2302
+
#### 💡 说明:
2303
2303
2304
-
`'inf'` and `'nan'` are special strings (case-insensitive), which when explicitly typecasted to `float` type, are used to represent mathematical "infinity" and "not a number" respectively.
0 commit comments