Expected an array-like object, but found a Variable

No worries! Hopefully you find the answer useful.
theano.tensor.extra_ops.Unique(False, False, True) return unique value and count, so you should do:

unique_value, count = theano.tensor.extra_ops.Unique(False, False, True)(delta)

And subtract the value accordingly.

However, I am not completely sure what you want to do, but since unique_value change length, you probably will have some problem building model on top of it (and sample from this model)