MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / parse_bool

Function parse_bool

lite/example/cpp_example/npy.h:261–269  ·  view source on GitHub ↗

Parses the string representation of a Python boolean */

Source from the content-addressed store, hash-verified

259 Parses the string representation of a Python boolean
260 */
261inline bool parse_bool(const std::string& in) {
262 if (in == "True")
263 return true;
264 if (in == "False")
265 return false;
266
267 fprintf(stderr, "Invalid python boolan.");
268 return false;
269}
270
271/**
272 Parses the string representation of a Python str

Callers 1

parse_headerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected