You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the logic that the coercion model uses when it calls an action:
Get the action object (an Action instance) given the parents of both arguments and the operation. This is cached using TripleDict, so lookup of known actions is fast.
Call the action using the generic __call__ interface.
The action checks again the parents of the arguments.
The actual action method _act_ is called.
Step 3 takes a non-trivial amount of time and is completely unneeded since the coercion model already knows that the parents are correct.
We also remove the (op is not sub) and (op is not isub) checks: I see no reason why actions should not be allowed for subtraction.
This is the logic that the coercion model uses when it calls an action:
Get the action object (an
Action
instance) given the parents of both arguments and the operation. This is cached usingTripleDict
, so lookup of known actions is fast.Call the action using the generic
__call__
interface.The action checks again the parents of the arguments.
The actual action method
_act_
is called.Step 3 takes a non-trivial amount of time and is completely unneeded since the coercion model already knows that the parents are correct.
We also remove the
(op is not sub) and (op is not isub)
checks: I see no reason why actions should not be allowed for subtraction.Depends on #24500
CC: @tscrim
Component: coercion
Author: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/26775
The text was updated successfully, but these errors were encountered: