13 #ifndef MLPACK_BINDINGS_PYTHON_STRIP_TYPE_HPP
14 #define MLPACK_BINDINGS_PYTHON_STRIP_TYPE_HPP
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=*]");
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...
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$