Closed MaxvdKolk closed 2 years ago
@MaxvdKolk the NonSphericalTaylor2
and SphericalTaylor2
use the ddgddy
property, which is an attribute of Taylor2
.
I think @Giannis1993 can best respond to this.
Indeed, @artofscience is correct. Both SphericalTaylor2
and NonSphericalTaylor2
inherit as much code as possible from Taylor2
, but can only inherit the update
method from Taylor1
becuz they compute ddgddy
differently.
Browsing through the code, I noticed the following here
The
SphericalTaylor2
class is defined asclass SphericalTaylor2(Taylor2)
but only seems to useTaylor1.update(self, x, f, df, ddf)
and nothing fromsuper()
(i.e.Taylor2
).Does it make sense to inherit from
Taylor1
instead and usesuper().update
in the reference line?A similar remark holds for
NonSphericalTaylor2