File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1713,10 +1713,10 @@ def format_percentiles(
1713
1713
1714
1714
percentiles = 100 * percentiles
1715
1715
1716
- int_idx = np .isclose (percentiles .astype ( int ), percentiles )
1716
+ int_idx = np .isclose (percentiles .round ( ), percentiles )
1717
1717
1718
1718
if np .all (int_idx ):
1719
- out = percentiles .astype (int ).astype (str )
1719
+ out = percentiles .round (). astype (int ).astype (str )
1720
1720
return [i + "%" for i in out ]
1721
1721
1722
1722
unique_pcts = np .unique (percentiles )
@@ -1729,7 +1729,7 @@ def format_percentiles(
1729
1729
).astype (int )
1730
1730
prec = max (1 , prec )
1731
1731
out = np .empty_like (percentiles , dtype = object )
1732
- out [int_idx ] = percentiles [int_idx ].astype (int ).astype (str )
1732
+ out [int_idx ] = percentiles [int_idx ].round (). astype (int ).astype (str )
1733
1733
1734
1734
out [~ int_idx ] = percentiles [~ int_idx ].round (prec ).astype (str )
1735
1735
return [i + "%" for i in out ]
You can’t perform that action at this time.
0 commit comments