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
Typically in the past I have allowed np to be replaced with a module like ad.math when I needed derivatives, but I believe that the ad package could become much simpler if the ADF class simply grew methods like those in ad.math. For example, the following seems to work nicely.
Are there any issues to be aware of? (I don't recall seeing this behaviour before so maybe the call to self.sin etc. is a new feature in numpy? I can't seem to find a reference to this behaviour though. I am using version 1.11.0.)
The text was updated successfully, but these errors were encountered:
I checked to see if this would work with sympy: there the issue comes up that some expressions already have method that clash ((x**y).exp was the example stated). However, I don't see why this would be a problem for ad right now.
Consider the following code:
Typically in the past I have allowed
np
to be replaced with a module likead.math
when I needed derivatives, but I believe that thead
package could become much simpler if theADF
class simply grew methods like those inad.math
. For example, the following seems to work nicely.Are there any issues to be aware of? (I don't recall seeing this behaviour before so maybe the call to
self.sin
etc. is a new feature in numpy? I can't seem to find a reference to this behaviour though. I am using version 1.11.0.)The text was updated successfully, but these errors were encountered: