File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ def _parse_float(value: Any) -> float:
433
433
434
434
Parameters
435
435
----------
436
- value : Any
436
+ value: Any
437
437
Value to parse
438
438
439
439
Returns
@@ -455,20 +455,19 @@ def _dump_float(value: float) -> Union[float, str]:
455
455
456
456
Parameters
457
457
----------
458
- value : float
458
+ value: float
459
459
Value to dump
460
460
461
461
Returns
462
462
-------
463
463
Union[float, str]
464
- Dumped valid, either a float or the strings
465
- "Infinity" or "-Infinity"
464
+ Dumped value, either a float or the strings
466
465
"""
467
466
if value == float ("inf" ):
468
467
return INFINITY
469
468
if value == - float ("inf" ):
470
469
return NEG_INFINITY
471
- if value == float ( "nan" ):
470
+ if math . isnan ( value ):
472
471
return NAN
473
472
return value
474
473
You can’t perform that action at this time.
0 commit comments