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
2280
+
c = float('-iNf') # 这些字符串不区分大小写
2281
2281
d = float('nan')
2282
2282
```
2283
2283
@@ -2295,7 +2295,7 @@ ValueError: could not convert string to float: some_other_string
2295
2295
True
2296
2296
>>> None == None # None==None
2297
2297
True
2298
-
>>> b == d #but nan!=nan
2298
+
>>> b == d #但是 nan!=nan
2299
2299
False
2300
2300
>>> 50/a
2301
2301
0.0
@@ -2305,9 +2305,9 @@ nan
2305
2305
nan
2306
2306
```
2307
2307
2308
-
#### 💡 Explanation:
2308
+
#### 💡 说明:
2309
2309
2310
-
`'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