K iZddlmZmZmZddlmZddlmZddlm Z ddl m Z ddl m Z mZddlmZmZdd lmZmZd d d Zej,d zZeeZd d dZd d dZd d dZGddeZGddeZGddeZGddeZGddeZ GddeZ!y))AddArgumentIndexErrorFunction)Pow)S)default_sort_key)sympify)explog)MaxMin)TokennoneTevaluatec \ttt||t|||SNr)r rr x1x2rs _/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/codegen/numpy_nodes.py _logaddexpr s% s3rH-s2/IT\] ^^c*t||tz Sr)r _ln2xrs r_lbr s q8 $T ))rc&tt||Sr)r_twors r_exp2r#s tQ **rc \ttt||t|||Sr)r rr#rs r _logaddexp2r%s. s5h/h/(D EErc4eZdZdZdZdZd dZdZdZdZ y) logaddexpz Logarithm of the sum of exponentiations of the inputs. Helper class for use with e.g. numpy.logaddexp See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.logaddexp.html rcLtj|gt|tSN)keyr__new__sortedrclsargss rr,zlogaddexp.__new__, IfT7G&HIIrc|dk(r|j\}}n!|dk(r|j\}}n t||tjtjt ||z zz Sz@ Returns the first derivative of this function. rr)r0rrOner selfargindexwrtothers rfdiffzlogaddexp.fdiff/sY q=JC ]JE3$T84 4uuaeec%)n,--rc t||SN)rr6rrkwargss r_eval_rewrite_as_logzlogaddexp._eval_rewrite_as_log;s"b!!rcL|jtj|i|Sr<rewriter evalfr6r0r>s r _eval_evalfzlogaddexp._eval_evalf>#&t||C &&777rcfd|jD\}}t||}|t||dk7r|St||S)Nc3BK|]}|jdiywN)simplify.0rr>s r z+logaddexp._eval_simplify..Bs8  $V$8sFr)r0rr'r6r0r>ab candidates ` r_eval_simplifyzlogaddexp._eval_simplifyAsD8dii81q!$  1a%8 8 Q? "rNr __name__ __module__ __qualname____doc__nargsr,r:r?rErSrJrrr'r' s( EJ ."8#rr'c4eZdZdZdZdZd dZdZdZdZ y) logaddexp2z Logarithm of the sum of exponentiations of the inputs in base-2. Helper class for use with e.g. numpy.logaddexp2 See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.logaddexp2.html rcLtj|gt|tSr)r+r.s rr,zlogaddexp2.__new__Vr1rc|dk(r|j\}}n!|dk(r|j\}}n t||tjtjt ||z zz Sr3)r0rrr4r#r5s rr:zlogaddexp2.fdiffYsZ q=JC ]JE3$T84 4uuaeeeE#I..//rc t||Sr<)r%r=s rr?zlogaddexp2._eval_rewrite_as_loges2r""rcL|jtj|i|Sr<rArDs rrEzlogaddexp2._eval_evalfhrFrcfd|jD\}}t||}|t||dk7r|St||S)Nc3^K|]$}|jdij&ywrI)rKfactorrLs rrNz,logaddexp2._eval_simplify..ls(A!  $V$++-As*-Fr)r0r%r\rOs ` rrSzlogaddexp2._eval_simplifyksEAtyyA11%  Aq59 9 a# #rNrTrUrJrrr\r\Js( EJ 0#8$rr\c0eZdZdZdxZZdeiZee Z y)aminz Minimum value along an axis. Helper class for use with e.g. numpy.amin See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.amin.html arrayaxisrhN rVrWrXrY __slots___fieldsrdefaults staticmethodr _construct_axisrJrrreret& ,+I~H"7+Orrec0eZdZdZdxZZdeiZee Z y)amaxz Maximum value along an axis. Helper class for use with e.g. numpy.amax See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.amax.html rfrhNrirJrrrqrqrorrqceZdZdZdZy)maximumz Element-wise maximum of array elements. Helper class for use with e.g. numpy.maximum See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.maximum.html c&t|jSr<)r r0r6r0s r_eval_rewrite_as_Maxzmaximum._eval_rewrite_as_MaxDIIrN)rVrWrXrYrvrJrrrsrs  rrsceZdZdZdZy)minimumz Element-wise minimum of array elements. Helper class for use with e.g. numpy.minimum See Also ======== https://numpy.org/doc/stable/reference/generated/numpy.minimum.html c&t|jSr<)r r0rus r_eval_rewrite_as_Minzminimum._eval_rewrite_as_MinrwrN)rVrWrXrYr|rJrrrzrzrxrrzN)"sympy.core.functionrrrsympy.core.powerrsympy.core.singletonrsympy.core.sortingrsympy.core.sympifyr &sympy.functions.elementary.exponentialr r (sympy.functions.elementary.miscellaneousr r astrrrr4r"rr r#r%r'r\rerqrsrzrJrrrsAA "/&;=$(_ uuQw 4y*+%)E '#'#T'$'$T ,5 , ,5 , h  h r