def add_to_zview(self, name, x, fail):

        return """
            PyArrayObject * add_rval = (PyArrayObject*)PyNumber_InPlaceAdd(
                    (PyObject*)zview, py_%(x)s);
            if (add_rval)
            {
                assert (PyArray_Check((PyObject*)add_rval));
                assert (PyArray_DATA(add_rval) == PyArray_DATA(zview));
                Py_DECREF(add_rval);
            }
            else
            {
                Py_DECREF(zview);
                %(fail)s;
            }""" % locals()
Return C code to add x to zview. Should DECREF zview if the
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/subtensor.py/IncSubtensor.add_to_zview