They already exist as Min and Max (the lowercase names are already taken by Python and we don't override builtin names). It's actually more complicated than what you suggest because they work on n arguments.
Aaron Meurer On Tuesday, December 22, 2015, Björn Dahlgren <[email protected]> wrote: > Hi all, > > I found myself looking for sympy.min and sympy.max today, a solution is > quite trivial: > > def min(a, b): > return Piecewise((a, a < b), (b, True)) > > and max in analogy. Would it make sense to include those functions? Are > they too simple? > Have I overlooked some aspect? > > Best regards, > Björn > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','sympy%[email protected]');>. > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at https://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/7189c27c-6db0-4b73-b752-91c28ffa538d%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/7189c27c-6db0-4b73-b752-91c28ffa538d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BpR_-rFHNrRdTR_9zT%3DDUSk%2BiX%3DHKjqhsMQaLrxkkz3g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
