(self, val)
return self._format_str % val
Return the value as a string with the prescribed number of decimals.
Return the value as a string with the prescribed number of decimals.
Return the value as a string with the prescribed number of decimals .
def repr_val(self, val):
        """
        Return the value as a string with the prescribed number of decimals.
        """
        # Table value can't be inf, but repr_val can be used to print any float
        if not np.isfinite(val):
            return "?"
        if self.format_str != "%g" \
                and abs(round(val, self._number_of_decimals) - val) \
                > self._max_round_diff:
            return f"{val:.{self._number_of_decimals + 2}f}"
        return self._format_str % val
def repr_val ( self , val ) : # Table value can't be inf, but repr_val can be used to print any float if not np . isfinite ( val ) : return "?" if self . format_str != "%g" and abs ( round ( val , self . _number_of_decimals ) - val ) > self . _max_round_diff : return f"{val:.{self._number_of_decimals + 2}f}" return self . _format_str % val