ChainRules.jl icon indicating copy to clipboard operation
ChainRules.jl copied to clipboard

Use CommutativeMulNumber everywhere it is needed (and no where it isn't)

Open sethaxen opened this issue 4 years ago • 0 comments

Currently, rules for * are constrained to CommutativeMulNumber types. This is unnecessary, because only two numbers at a time are multiplied, so commutation is never needed. These constraints should be relaxed.

Conversely, the scalar rule for ^ requires commutativity but makes no such type constraint. It should be limited to CommutativeMulNumber.

There may be other cases.

sethaxen avatar Aug 18 '21 08:08 sethaxen