MCPcopy Create free account
hub / github.com/numpy/numpy / _cseries_to_zseries

Function _cseries_to_zseries

numpy/polynomial/chebyshev.py:132–154  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

130#
131
132def _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
157def _zseries_to_cseries(zs):

Callers 3

chebmulFunction · 0.85
chebdivFunction · 0.85
chebpowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…