diff --git a/aesara/tensor/basic.py b/aesara/tensor/basic.py index 11c905119a..99901c39cb 100644 --- a/aesara/tensor/basic.py +++ b/aesara/tensor/basic.py @@ -577,16 +577,15 @@ def c_code(self, node, name, inputs, outputs, sub): return ( """ %(z)s = (PyArrayObject*)PyArray_FromScalar(py_%(x)s, NULL); - if(py_%(z)s == NULL){ + if(%(z)s == NULL){ %(fail)s; } - Py_XINCREF(%(z)s); """ % locals() ) def c_code_cache_version(self): - return (1,) + return (2,) tensor_from_scalar = TensorFromScalar()