3 ms·
> multiplication (product rule) doesn't seem to be handled there (only `def_linear(anp.multiply)`) def_linear is what handles the product rule. Other product o
by yorwba 8y ago
> multiplication (product rule) doesn't seem to be handled there (only `def_linear(anp.multiply)`)
def_linear is what handles the product rule. Other product operations (like anp.cross, anp.inner etc.) are implemented the same way. It's called "linear" because products are multi-linear functions, i.e. they are linear in each individual argument and you can get the derivative with respect to each parameter by simple substitution. (x+Δx)y - xy = Δxy. Together with the chain-rule for multi-parameter functions, the classic product rule falls out for free.