Expected an array-like object, but found a Variable

DiscreteUniform is not a function, so the usage is a bit different - in general you use it to create a random variable within a model context (whereas theano/aesara operation works outside the model context as well).