correct cython wrapper module name in pyx import
parent
435870ebf0
commit
547606e6c2
|
@ -29,6 +29,7 @@ using namespace std;
|
|||
using namespace wrap;
|
||||
|
||||
/* ************************************************************************* */
|
||||
/// Cython: Rename functions which names are python keywords
|
||||
static const std::array<std::string,2> pythonKeywords{{"print", "lambda"}};
|
||||
static std::string pyRename(const std::string& name) {
|
||||
if (std::find(pythonKeywords.begin(), pythonKeywords.end(), name) ==
|
||||
|
|
|
@ -369,9 +369,10 @@ void Module::emit_cython_pxd(FileWriter& pxdFile) const {
|
|||
/* ************************************************************************* */
|
||||
void Module::emit_cython_pyx(FileWriter& pyxFile) const {
|
||||
// headers...
|
||||
string pxdHeader = name + "_wrapper";
|
||||
pyxFile.oss << "cimport numpy as np\n"
|
||||
"cimport cythontest_wrapper as gtsam\n"
|
||||
"from cythontest_wrapper cimport shared_ptr\n"
|
||||
"cimport " << pxdHeader << " as " << name << "\n"
|
||||
"from "<< pxdHeader << " cimport shared_ptr\n"
|
||||
"from eigency.core cimport *\n"
|
||||
"from libcpp cimport bool\n\n"
|
||||
"from libcpp.pair cimport pair\n"
|
||||
|
|
Loading…
Reference in New Issue