Convert Chebyshev series to z-series. Convert a Chebyshev series to the equivalent z-series. The result is never an empty array. The dtype of the return is the same as that of the input. No checks are run on the arguments as this routine is for internal use. Parameters ----
(c)
| 130 | # |
| 131 | |
| 132 | def _cseries_to_zseries(c): |
| 133 | """Convert Chebyshev series to z-series. |
| 134 | |
| 135 | Convert a Chebyshev series to the equivalent z-series. The result is |
| 136 | never an empty array. The dtype of the return is the same as that of |
| 137 | the input. No checks are run on the arguments as this routine is for |
| 138 | internal use. |
| 139 | |
| 140 | Parameters |
| 141 | ---------- |
| 142 | c : 1-D ndarray |
| 143 | Chebyshev coefficients, ordered from low to high |
| 144 | |
| 145 | Returns |
| 146 | ------- |
| 147 | zs : 1-D ndarray |
| 148 | Odd length symmetric z-series, ordered from low to high. |
| 149 | |
| 150 | """ |
| 151 | n = c.size |
| 152 | zs = np.zeros(2 * n - 1, dtype=c.dtype) |
| 153 | zs[n - 1:] = c / 2 |
| 154 | return zs + zs[::-1] |
| 155 | |
| 156 | |
| 157 | def _zseries_to_cseries(zs): |