Descending order

Hi all,

The conversion to sort in ascending order is implemented in the Ordered function, but I would like to sample in descending order. How should this be implemented?
I would be thankful if you could help me with this question.

   sigma_W = pm.HalfNormal("sigma_W", 
                            sigma=1,
                            shape=(5),
                            transform=pm.distributions.transforms.Ordered()
                            )

You can reverse with indexing after tou define the variable:

x = pm.HalfNormal(...)[::-1]
1 Like