The following minimalistic script crashes with SymPy 1.12 and Python 3.11:
import sympy as sp
u, v = sp.symbols("u v")
sp.Min(u**1.0*v, v**1.0*u)
The result is a TypeError: cannot determine truth value of Relational. I have this situation arising implicitly in a general framework, so just dropping the (here) unnecessary minimum or the **1.0 is not feasible for me. Using something implicit to simplify the expression would be fine, but for example calling sp.simplify on the first or second argument doesn't succeed at simplifying the expression.
Sympy.Min is a Relational type. Meaning it evaluates the relation between
u**1.0*v==uvandv**1.0*u==vu==uv. And since both of those expressions essentially are the same thing, it can't evaluate (i.e. It is not of the correct type). Put simply, it's like comparing x to x itself.What you need to do here is simply something like
sp.Min(u**(1.0*v), v**(1.0*u))(if this is what you wanted).See this also.