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
2275
+
c = float('-iNf') # 这些字符串不区分大小写
2276
2276
d = float('nan')
2277
2277
```
2278
2278
@@ -2290,7 +2290,7 @@ ValueError: could not convert string to float: some_other_string
2290
2290
True
2291
2291
>>> None == None # None==None
2292
2292
True
2293
-
>>> b == d #but nan!=nan
2293
+
>>> b == d #但是 nan!=nan
2294
2294
False
2295
2295
>>> 50/a
2296
2296
0.0
@@ -2300,9 +2300,9 @@ nan
2300
2300
nan
2301
2301
```
2302
2302
2303
-
#### 💡 Explanation:
2303
+
#### 💡 说明:
2304
2304
2305
-
`'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