Custom theano Op to do numerical integration

Everything seems to be right:

Adding this to __init__:

print("Input types: ", [i.dtype for i in [var] + list(extra_vars)])
print("Output type: ", self._expr.type, self._expr.dtype)

prints out:

Input types:  ['float64', 'float64', 'float64']
Output type:  TensorType(float64, (?,)) float64

I also added this to make_node:

print("Make node input types: ", [
    (i.type, i.dtype)
    for i in
    [self._start, self._stop] + list(self._extra_vars_node)
])
print(
    "Make node output type: ", 
    self._expr.type()
)

which prints:

Make node input types:  [(TensorType(float64, ()), 'float64'), (TensorType(float64, ()), 'float64'), (TensorType(float64, ()), 'float64'), (TensorType(float64, (3,)), 'float64')]
Make node output type:  <TensorType(float64, (?,))>

I thought the problem could be that it doesn’t know the exact output shape, but passing it directly doesn’t seem to solve the problem either.