Replace edge_type with Edge and create Variable::gradient_edge() (#5030)

This commit is contained in:
Peter Goldsborough
2018-02-07 10:50:42 -08:00
committed by Zachary DeVito
parent 0390587d12
commit 25e946bf78
20 changed files with 191 additions and 128 deletions

View File

@ -105,10 +105,10 @@ PyObject* THPCppFunction_next_functions(THPCppFunction* self, PyObject* hook)
auto& c_tuple = next_functions[i];
THPObjectPtr tuple(PyTuple_New(2));
if (!tuple) return NULL;
PyObject *py_fn = functionToPyObject(c_tuple.first);
PyObject *py_fn = functionToPyObject(c_tuple.function);
if (!py_fn) return NULL;
PyTuple_SET_ITEM(tuple.get(), 0, py_fn);
PyObject *py_idx = PyLong_FromLong(c_tuple.second);
PyObject *py_idx = PyLong_FromLong(c_tuple.input_nr);
if (!py_idx) return NULL;
PyTuple_SET_ITEM(tuple.get(), 1, py_idx);
PyTuple_SET_ITEM(py_functions.get(), i, tuple.release());