Best way of having a decreasing ordered RV

I have a model where a particular list of RVs must be in decreasing order.
What I’m doing is:

# Increasing RV
ss_inc = pm.Gamma("sigmas", alpha=1, beta=1, shape=4, transform=ordered, initval=[0.1, 0.2, 0.3, 0.4])
# Decreasing RV
ss_dec = ss_inc[::-1]

ss_inc is in increasing order and then ss_dec is in decreasing order. It seems to work but I wonder if this is the best way of getting ss_dec decreasing.

1 Like

Yes that should be fine

1 Like