Convert z-series to a Chebyshev series. Convert a z series to the equivalent Chebyshev 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 --
(zs)
| 156 | |
| 157 | |
| 158 | def _zseries_to_cseries(zs): |
| 159 | """Convert z-series to a Chebyshev series. |
| 160 | |
| 161 | Convert a z series to the equivalent Chebyshev series. The result is |
| 162 | never an empty array. The dtype of the return is the same as that of |
| 163 | the input. No checks are run on the arguments as this routine is for |
| 164 | internal use. |
| 165 | |
| 166 | Parameters |
| 167 | ---------- |
| 168 | zs : 1-D ndarray |
| 169 | Odd length symmetric z-series, ordered from low to high. |
| 170 | |
| 171 | Returns |
| 172 | ------- |
| 173 | c : 1-D ndarray |
| 174 | Chebyshev coefficients, ordered from low to high. |
| 175 | |
| 176 | """ |
| 177 | n = (zs.size + 1)//2 |
| 178 | c = zs[n-1:].copy() |
| 179 | c[1:n] *= 2 |
| 180 | return c |
| 181 | |
| 182 | |
| 183 | def _zseries_mul(z1, z2): |