The last phase of this journey has started. I am happy to let you know that I have passed Phase 2 successfully. Phase 3 will include merging of some important code written in Phase 2, and also implementation of some other useful code. I had a meeting with Sartaj in which we discussed about the deliverables to be completed in the last phase.
FormalPowerSeries classPR has undergone a lot of changes. There has been quite a number of API changes, inorder to make the subclasses more usable by the users. The wrapper
FiniteFormalPowerSeriesclass now looks somewhat like this :–
class FiniteFormalPowerSeries(FormalPowerSeries): """Base Class for Product, Compose and Inverse classes""" def __init__(self, *args): pass @property def ffps(self): return self.args @property def gfps(self): return self.args @property def f(self): return self.ffps.function @property def g(self): return self.gfps.function @property def infinite(self): raise NotImplementedError("No infinite version for an object of" " FiniteFormalPowerSeries class.") def _eval_terms(self, n): raise NotImplementedError("(%s)._eval_terms()" % self) def _eval_term(self, pt): raise NotImplementedError("By the current logic, one can get terms" "upto a certain order, instead of getting term by term.") def polynomial(self, n): return self._eval_terms(n) def _eval_derivative(self, x): raise NotImplementedError def integrate(self, x): raise NotImplementedError
As you can see, there are four properties namely
Formal Power Series of the first function).
Formal Power Series of the second function), and
g, which are the two functions respectively. This was done so that the API of the three subclasses can be changed to, for example
FormalPowerSeriesCompose((self, other), self.x, self.x0, self.dir, ((self.bell_coeff_seq,), self.xk, self.ind)).
formal power series instead of
functions, since the computation in the
_eval_terms() function in the three subclasses will be quite easy.
- I also started working on the PR which implements
aseriesfunction for various special functions. I hav e already implemented for
erfvariants. The PR should be ready by the next week. Also the suggestions provided by Sartaj on the first
aseriesPR #17167, have been integrated. You can view them in the PR.
That’s it for this week. See you in the next week.