tensorflow_decision_forests/keras/wrapper/wrapper.cc
// Converts a floating point value to its python representation.
Converts a floating point value to its python representation.
Converts a floating point value to its python representation .
std::string PythonFloat(const float value) {
  std::string str_value;
  absl::StrAppendFormat(&str_value, "%g", value);
  if (std::isfinite(value) && !absl::StrContains(str_value, "+")) {
    if (!absl::StrContains(str_value, ".")) {
      absl::StrAppend(&str_value, ".0");
    }
  }
  return str_value;
}
std :: string PythonFloat ( const float value ) { std :: string str_value ; absl :: StrAppendFormat ( & str_value , " " , value ) ; if ( std :: isfinite ( value ) && ! absl :: StrContains ( str_value , " " ) ) { if ( ! absl :: StrContains ( str_value , " " ) ) { absl :: StrAppend ( & str_value , " " ) ; } } return str_value ; }
Converts a floating point value to its python representation.
Converts a floating point value to its python representation .
// Check if the number is finite and written in decimal notation. // Make sure the value is a python floating point number.