How would one go about contributing a fix to this? It should be easy. I 
would be happy to try. Could you provide some links on how to do it?  

El dia dimarts, 14 de setembre de 2021 a les 13:26:28 UTC+2, Michael 
Orlitzky va escriure:

> On Fri, 2021-09-03 at 02:25 -0700, Pol del Aguila Pla wrote:
> > I've encountered a bug in minimize_constrained where it seems that the 
> > variable name has an effect on the result. My guess is that this happens 
> > somewhere along the translation from symbolic to numerical function. 
> > Attached is a minimal notebook to reproduce the bug. Run in the latest 
> > docker image sagemath/sagemath:latest.
> > 
>
> minimize_constrained() is using the variables() method on your
> function, and variables() sorts said variables alphabetically. So, for
> example,
>
> sage: cm1,c0,c1 = SR.var('cm1,c0,c1')
> sage: f(cm1,c0,c1) = cm1 + c0 + c1
> sage: f.variables() 
> (c0, c1, cm1)
>
> The minimizer is thus not in the order that you'd expect (i.e. not in
> the correct order to be passed to f). I opened
>
> https://trac.sagemath.org/ticket/32511
>
> for this.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/06f2a3aa-c368-48a4-ab91-69f5ab76c31dn%40googlegroups.com.

Reply via email to