Set parameters working

This commit is contained in:
2023-11-10 10:43:24 +01:00
parent 8334f81276
commit 384b9071a2
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ namespace pywrap {
namespace np = boost::python::numpy;
PyClassifier::PyClassifier(const std::string& module, const std::string& className) : module(module), className(className), fitted(false)
{
id = reinterpret_cast<uint32_t>(&this);
id = 0;//reinterpret_cast<uint32_t>(&this);
pyWrap = PyWrap::GetInstance();
pyWrap->importClass(module, className);
}

View File

@@ -133,7 +133,7 @@ namespace pywrap {
}
int res = PyObject_SetAttrString(instance, key.c_str(), pValue);
if (res == -1 && PyErr_Occurred()) {
cleanDictionary(args);
Py_XDECREF(pValue);
errorAbort("Couldn't set attribute " + key + "=" + value.dump());
}
Py_XDECREF(pValue);