Expected an array-like object, but found a Variable

Yes I understand
That makes it so difficult :stuck_out_tongue_closed_eyes:

This worked as per your advice:
st = theano.tensor.extra_ops.Unique(False, False, True)(delta)
But now I want to subtract 1 of the values

a = st - 1
Gives:

TypeError: unsupported operand type(s) for -: โ€˜listโ€™ and โ€˜intโ€™

Can you give me a clue?
Do I need theano.scan??

I promise that there will be no more questions in this post :blush:

Regards Hans