diff --git a/wrap/Module.cpp b/wrap/Module.cpp index 9422ac726..a6d9a72f6 100644 --- a/wrap/Module.cpp +++ b/wrap/Module.cpp @@ -420,12 +420,6 @@ void Module::emit_cython_pyx(FileWriter& pyxFile) const { "from libcpp.pair cimport pair\n" "from libcpp.string cimport string\n" "from cython.operator cimport dereference as deref\n\n\n"; - pyxFile.oss << -R"rawstr(def Vectorize(*args): - ret = npp.squeeze(npp.asarray(args, dtype='float')) - if ret.ndim == 0: ret = npp.expand_dims(ret, axis=0) - return ret -)rawstr"; // all classes include all forward declarations std::vector allClasses = expandedClasses; diff --git a/wrap/ReturnType.cpp b/wrap/ReturnType.cpp index dbaf2f25c..506e7d471 100644 --- a/wrap/ReturnType.cpp +++ b/wrap/ReturnType.cpp @@ -94,7 +94,7 @@ std::string ReturnType::pyx_casting(const std::string& var, if (isEigen()) { string s = "ndarray_copy(" + var + ")"; if (pyxClassName() == "Vector") - return "Vectorize(" + s + ")"; + return s + ".squeeze()"; else return s; } else if (isNonBasicType()) {