13 #ifndef MLPACK_BINDINGS_PYTHON_STRIP_TYPE_HPP 14 #define MLPACK_BINDINGS_PYTHON_STRIP_TYPE_HPP 29 std::string& strippedType,
30 std::string& printedType,
31 std::string& defaultsType)
35 printedType = inputType;
36 strippedType = inputType;
37 defaultsType = inputType;
38 if (printedType.find(
"<") != std::string::npos)
41 const size_t loc = printedType.find(
"<>");
42 if (loc != std::string::npos)
45 strippedType.replace(loc, 2,
"");
46 printedType.replace(loc, 2,
"[]");
47 defaultsType.replace(loc, 2,
"[T=*]");
Linear algebra utility functions, generally performed on matrices or vectors.
void StripType(const std::string &inputType, std::string &strippedType, std::string &printedType, std::string &defaultsType)
Given an input type like, e.g., "LogisticRegression<>", return three types that can be used in Python...