MCPcopy Create free account
hub / github.com/MTG/essentia / init

Method init

src/python/pyalgorithm.cpp:95–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95int PyAlgorithm::init(PyAlgorithm *self, PyObject *args, PyObject *kwds) {
96 static char *kwlist[] = { (char*)"name", NULL };
97 char* algoname;
98
99 if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &algoname)) {
100 return -1;
101 }
102
103 E_DEBUG(EPyBindings, "Standard : " << algoname << "::init()");
104
105 try {
106 E_DEBUG(EPyBindings, "Standard : creating with name " << algoname);
107 self->algo = AlgorithmFactory::create(algoname);
108 }
109 catch (exception& e) {
110 PyErr_SetString(PyExc_ValueError, e.what());
111 return -1;
112 }
113
114 E_DEBUG(EPyBindings, PY_ALGONAME << "::init() done!");
115 return 0;
116}
117
118
119

Callers 2

configureMethod · 0.45
computeMethod · 0.45

Calls 2

createFunction · 0.85
whatMethod · 0.45

Tested by 1

computeMethod · 0.36