pytorch-inference
|
Classes | |
class | py_object |
Functions | |
PyObject * | to_python (const std::vector< int > &vec) |
Takes a vector to a python list. More... | |
PyObject * | to_python (std::vector< int > &&vec) |
Takes a vector to a python list. More... | |
PyObject * | to_python (const std::vector< long > &vec) |
PyObject * | to_python (std::vector< long > &&vec) |
PyObject * | to_python (const std::vector< double > &vec) |
PyObject * | to_python (std::vector< double > &&vec) |
PyObject * | to_python (const std::vector< float > &vec) |
PyObject * | to_python (std::vector< float > &&vec) |
PyObject * | to_python (const std::vector< std::string > &vec) |
PyObject * | to_python (std::vector< std::string > &&vec) |
PyObject * | to_python (const int &num) |
Takes an int to a python int. Thin wrapper around PyLong _FromLong. More... | |
PyObject * | to_python (int &&num) |
Takes an int to a python int. Thin wrapper around PyLong _FromLong. More... | |
PyObject * | to_python (const long &num) |
Takes a long to a python int. Thin wrapper around PyLong _FromLong. More... | |
PyObject * | to_python (long &&num) |
Takes a long to a python int. Thin wrapper around PyLong _FromLong. More... | |
PyObject * | to_python (const float &num) |
Takes a float to a python float. Thin wrapper around PyFloat_FromDouble. More... | |
PyObject * | to_python (float &&num) |
Takes a float to a python float. Thin wrapper around PyFloat_FromDouble. More... | |
PyObject * | to_python (const double &num) |
Takes a double to a python float. Thin wrapper around PyFloat_FromDouble. More... | |
PyObject * | to_python (double &&num) |
Takes a double to a python float. Thin wrapper around PyFloat_FromDouble. More... | |
PyObject * | to_python (const std::string &str) |
Takes an std::string to a Python string. Thin wrapper around PyUnicode_FromString. More... | |
PyObject * | to_python (std::string &&str) |
Takes an std::string to a Python string. Thin wrapper around PyUnicode_FromString. More... | |
PyObject * | to_python (const char *str) |
Takes a char * to a Python string. Thin wrapper around PyUnicode_FromString. More... | |
PyObject * | to_python (char *str) |
Takes a char * to a Python string. Thin wrapper around PyUnicode_FromString. More... | |
void | from_python (PyObject *pyobj, std::string &cppobj) |
String specialization. More... | |
void | from_python (PyObject *pyobj, int &cppobj) |
Int specialization. More... | |
void | from_python (PyObject *pyobj, long &cppobj) |
Long specialization. More... | |
void | from_python (PyObject *pyobj, float &cppobj) |
Float specialization. More... | |
void | from_python (PyObject *pyobj, double &cppobj) |
Double specialization. More... | |
void | from_python (PyObject *pyobj, std::vector< std::string > &cppobj) |
String vector specialization. More... | |
void | from_python (PyObject *pyobj, std::vector< int > &cppobj) |
Int vector specialization. More... | |
void | from_python (PyObject *pyobj, std::vector< long > &cppobj) |
Long vector specialization. More... | |
void | from_python (PyObject *pyobj, std::vector< float > &cppobj) |
Float vector specialization. More... | |
void | from_python (PyObject *pyobj, std::vector< double > &cppobj) |
Double vector specialization. More... | |
PyObject * | make_tuple (std::initializer_list< PyObject *> l) |
Makes a PyTuple. More... | |
PyObject * | make_tuple (std::vector< PyObject *> l) |
Makes a PyTuple. More... | |
PyObject * | make_dict (std::initializer_list< PyObject *> l) |
Makes a PyDict. More... | |
|
inline |
String specialization.
|
inline |
Int specialization.
|
inline |
Long specialization.
|
inline |
Float specialization.
|
inline |
Double specialization.
|
inline |
String vector specialization.
|
inline |
Int vector specialization.
|
inline |
Long vector specialization.
|
inline |
Float vector specialization.
|
inline |
Double vector specialization.
|
inline |
Makes a PyDict.
Makes a python dictionary for the purpose of passing keyword arguments. Note that the order of arguments is as follows: make_dict({pycpp::to_python("key_n"), pycpp::to_python(<value_n>)}) where n is the total number of key-value PAIRS.
l | The initializer_list of key-value pairs. |
|
inline |
Makes a PyTuple.
Makes a python tuple for the purpose of passing arguments to a python function. All arguments to this function MUST be of type PyObject * as follows: make_tuple({pycpp::to_python(<value_1>), pycpp::to_python(<value_2>)})
l | The initializer list of arguments to be put into the tuple. |
|
inline |
Makes a PyTuple.
Makes a python tuple for the purpose of passing arguments to a python function. All arguments to this function MUST be of type PyObject * as follows: make_tuple({pycpp::to_python(<value_1>), pycpp::to_python(<value_2>)})
l | The vector of arguments to be put into the tuple. |
|
inline |
Takes a vector to a python list.
vec | Vector of ints to take to a Python list. |
|
inline |
Takes a vector to a python list.
vec | Vector of ints to take to a Python list. |
|
inline |
vec | Vector of longs to take to a Python list. |
|
inline |
vec | Vector of longs to take to a Python list. |
|
inline |
vec | Vector of doubles to take to a Python list. |
|
inline |
vec | Vector of doubles to take to a Python list. |
|
inline |
vec | Vector of floats to take to a Python list. |
|
inline |
vec | Vector of floats to take to a Python list. |
|
inline |
vec | Vector of strings to take to a Python list. |
|
inline |
vec | Vector of strings to take to a Python list. |
|
inline |
Takes an int to a python int. Thin wrapper around PyLong _FromLong.
num | Numeric value to be converted |
|
inline |
Takes an int to a python int. Thin wrapper around PyLong _FromLong.
num | Numeric value to be converted |
|
inline |
Takes a long to a python int. Thin wrapper around PyLong _FromLong.
num | Numeric value to be converted |
|
inline |
Takes a long to a python int. Thin wrapper around PyLong _FromLong.
num | Numeric value to be converted |
|
inline |
Takes a float to a python float. Thin wrapper around PyFloat_FromDouble.
num | Numeric value to be converted |
|
inline |
Takes a float to a python float. Thin wrapper around PyFloat_FromDouble.
num | Numeric value to be converted |
|
inline |
Takes a double to a python float. Thin wrapper around PyFloat_FromDouble.
num | Numeric value to be converted |
|
inline |
Takes a double to a python float. Thin wrapper around PyFloat_FromDouble.
num | Numeric value to be converted |
|
inline |
Takes an std::string to a Python string. Thin wrapper around PyUnicode_FromString.
str | The std::string to be converted |
|
inline |
Takes an std::string to a Python string. Thin wrapper around PyUnicode_FromString.
str | The std::string to be converted |
|
inline |
Takes a char * to a Python string. Thin wrapper around PyUnicode_FromString.
str | The char * to be converted |
|
inline |
Takes a char * to a Python string. Thin wrapper around PyUnicode_FromString.
str | The char * to be converted |