Convert series to a different kind and/or domain and/or window. Parameters ---------- domain : array_like, optional The domain of the converted series. If the value is None, the default domain of `kind` is used. kind : class, optional
(self, domain=None, kind=None, window=None)
| 777 | return self.__class__(coef, self.domain, self.window, self.symbol) |
| 778 | |
| 779 | def convert(self, domain=None, kind=None, window=None): |
| 780 | """Convert series to a different kind and/or domain and/or window. |
| 781 | |
| 782 | Parameters |
| 783 | ---------- |
| 784 | domain : array_like, optional |
| 785 | The domain of the converted series. If the value is None, |
| 786 | the default domain of `kind` is used. |
| 787 | kind : class, optional |
| 788 | The polynomial series type class to which the current instance |
| 789 | should be converted. If kind is None, then the class of the |
| 790 | current instance is used. |
| 791 | window : array_like, optional |
| 792 | The window of the converted series. If the value is None, |
| 793 | the default window of `kind` is used. |
| 794 | |
| 795 | Returns |
| 796 | ------- |
| 797 | new_series : series |
| 798 | The returned class can be of different type than the current |
| 799 | instance and/or have a different domain and/or different |
| 800 | window. |
| 801 | |
| 802 | Notes |
| 803 | ----- |
| 804 | Conversion between domains and class types can result in |
| 805 | numerically ill defined series. |
| 806 | |
| 807 | """ |
| 808 | if kind is None: |
| 809 | kind = self.__class__ |
| 810 | if domain is None: |
| 811 | domain = kind.domain |
| 812 | if window is None: |
| 813 | window = kind.window |
| 814 | return self(kind.identity(domain, window=window, symbol=self.symbol)) |
| 815 | |
| 816 | def mapparms(self): |
| 817 | """Return the mapping parameters. |