You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file htm.core/docs/NetworkAPI_Engine.md it says that setParameter is available to use in python, but it is not.
Expected behavior: region.setParameter("name", value)
Actual behavior: RuntimeError: Attribute setParameter not found.
The text was updated successfully, but these errors were encountered:
That is an error in the md. For Python the data type needs to be known because it needs to convert the python representation to the C++ representation. So, you need to call one of these to set a parameter.
py_Region.def("setParameterByte", &Region::setParameterByte)
.def("setParameterInt32", &Region::setParameterInt32)
.def("setParameterUInt32", &Region::setParameterUInt32)
.def("setParameterInt64", &Region::setParameterInt64)
.def("setParameterUInt64", &Region::setParameterUInt64)
.def("setParameterReal32", &Region::setParameterReal32)
.def("setParameterReal64", &Region::setParameterReal64)
.def("setParameterBool", &Region::setParameterBool)
.def("setParameterString", &Region::setParameterString)
.def("setParameterArray", &Region::setParameterArray)
.def("setParameterJSON", &Region::setParameterJSON);
Sorry for the confusion. I will make the change in the docs.
May I suggest an alternative. Provide your parameters in a JSON string in the addRegion() function rather than setting them individually with one of the setParameterXXX() variants.
In the file htm.core/docs/NetworkAPI_Engine.md it says that setParameter is available to use in python, but it is not.
Expected behavior:
region.setParameter("name", value)
Actual behavior:
RuntimeError: Attribute setParameter not found
.The text was updated successfully, but these errors were encountered: